Add another no:terminal fix and add a test.

This commit is contained in:
Tom Boshoven
2019-09-12 10:32:20 -04:00
parent 0b0de014ec
commit 8cbbbe1a2a
2 changed files with 19 additions and 1 deletions

View File

@@ -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."""

View File

@@ -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).