From 8cbbbe1a2a997eccd09cb6995af22488e877223c Mon Sep 17 00:00:00 2001 From: Tom Boshoven Date: Thu, 12 Sep 2019 10:32:20 -0400 Subject: [PATCH] Add another no:terminal fix and add a test. --- src/xdist/workermanage.py | 5 ++++- testing/acceptance_test.py | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/xdist/workermanage.py b/src/xdist/workermanage.py index 0947972..d95b481 100644 --- a/src/xdist/workermanage.py +++ b/src/xdist/workermanage.py @@ -112,7 +112,10 @@ class NodeManager(object): ignores += self.config.option.rsyncignore ignores += self.config.getini("rsyncignore") - return {"ignores": ignores, "verbose": self.config.option.verbose} + return { + "ignores": ignores, + "verbose": getattr(self.config.option, "verbose", False), + } def rsync(self, gateway, source, notify=None, verbose=False, ignores=None): """Perform rsync to remote hosts for node.""" diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index c7c739f..9476499 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1074,6 +1074,21 @@ def test_color_yes_collection_on_non_atty(testdir, request): assert "gw0 C / gw1 C" not in result.stdout.str() +def test_without_terminal_plugin(testdir, request): + """ + No output when terminal plugin is disabled + """ + testdir.makepyfile( + """ + def test_1(): + pass + """ + ) + result = testdir.runpytest("-p", "no:terminal", "-n2") + assert result.stdout.str() == "" + assert result.stderr.str() == "" + + def test_internal_error_with_maxfail(testdir): """ Internal error when using --maxfail option (#62, #65).