Skip to content

Commit 566480f

Browse files
committed
Add test and silence completely
1 parent 5465d93 commit 566480f

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

testing/acceptance_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,18 @@ def test_hello():
358358

359359

360360
class TestTerminalReporting:
361+
def test_quiet_no_output(self, testdir):
362+
testdir.makepyfile(
363+
"""
364+
def test_ok():
365+
pass
366+
"""
367+
)
368+
result = testdir.runpytest("-q")
369+
result.stdout.fnmatch_lines(
370+
[".*[100%]*", "*1*passed*"]
371+
)
372+
361373
def test_pass_skip_fail(self, testdir):
362374
testdir.makepyfile(
363375
"""

xdist/dsession.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,10 @@ def worker_collectionfinish(self, node, ids):
229229
if self.terminal and not self.sched.has_pending:
230230
self.trdist.ensure_show_status()
231231
self.terminal.write_line("")
232-
self.terminal.write_line(
233-
"scheduling tests via %s" % (self.sched.__class__.__name__)
234-
)
232+
if self.config.option.verbose > 0:
233+
self.terminal.write_line(
234+
"scheduling tests via %s" % (self.sched.__class__.__name__)
235+
)
235236
self.sched.schedule()
236237

237238
def worker_logstart(self, node, nodeid, location):

0 commit comments

Comments
 (0)