Add test and silence completely

This commit is contained in:
Ethan Smith
2018-11-29 00:25:30 -08:00
parent 5465d936f7
commit 566480fdd3
2 changed files with 16 additions and 3 deletions

View File

@@ -358,6 +358,18 @@ class TestDistEach:
class TestTerminalReporting: class TestTerminalReporting:
def test_quiet_no_output(self, testdir):
testdir.makepyfile(
"""
def test_ok():
pass
"""
)
result = testdir.runpytest("-q")
result.stdout.fnmatch_lines(
[".*[100%]*", "*1*passed*"]
)
def test_pass_skip_fail(self, testdir): def test_pass_skip_fail(self, testdir):
testdir.makepyfile( testdir.makepyfile(
""" """

View File

@@ -229,6 +229,7 @@ class DSession(object):
if self.terminal and not self.sched.has_pending: if self.terminal and not self.sched.has_pending:
self.trdist.ensure_show_status() self.trdist.ensure_show_status()
self.terminal.write_line("") self.terminal.write_line("")
if self.config.option.verbose > 0:
self.terminal.write_line( self.terminal.write_line(
"scheduling tests via %s" % (self.sched.__class__.__name__) "scheduling tests via %s" % (self.sched.__class__.__name__)
) )