Skip to content

Commit 8cbbbe1

Browse files
committed
Add another no:terminal fix and add a test.
1 parent 0b0de01 commit 8cbbbe1

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/xdist/workermanage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def _getrsyncoptions(self):
112112
ignores += self.config.option.rsyncignore
113113
ignores += self.config.getini("rsyncignore")
114114

115-
return {"ignores": ignores, "verbose": self.config.option.verbose}
115+
return {
116+
"ignores": ignores,
117+
"verbose": getattr(self.config.option, "verbose", False),
118+
}
116119

117120
def rsync(self, gateway, source, notify=None, verbose=False, ignores=None):
118121
"""Perform rsync to remote hosts for node."""

testing/acceptance_test.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,21 @@ def test_this(i):
10741074
assert "gw0 C / gw1 C" not in result.stdout.str()
10751075

10761076

1077+
def test_without_terminal_plugin(testdir, request):
1078+
"""
1079+
No output when terminal plugin is disabled
1080+
"""
1081+
testdir.makepyfile(
1082+
"""
1083+
def test_1():
1084+
pass
1085+
"""
1086+
)
1087+
result = testdir.runpytest("-p", "no:terminal", "-n2")
1088+
assert result.stdout.str() == ""
1089+
assert result.stderr.str() == ""
1090+
1091+
10771092
def test_internal_error_with_maxfail(testdir):
10781093
"""
10791094
Internal error when using --maxfail option (#62, #65).

0 commit comments

Comments
 (0)