Adjust the 'durations hidden' message
This commit is contained in:
parent
7a271a91b0
commit
3683d92c53
|
@ -51,7 +51,8 @@ def pytest_terminal_summary(terminalreporter):
|
||||||
|
|
||||||
for rep in dlist:
|
for rep in dlist:
|
||||||
if verbose < 2 and rep.duration < 0.005:
|
if verbose < 2 and rep.duration < 0.005:
|
||||||
tr.write_line("0.00 durations hidden. Use -vv to show these durations.")
|
tr.write_line("")
|
||||||
|
tr.write_line("(0.00 durations hidden. Use -vv to show these durations.)")
|
||||||
break
|
break
|
||||||
nodeid = rep.nodeid.replace("::()::", "::")
|
nodeid = rep.nodeid.replace("::()::", "::")
|
||||||
tr.write_line("%02.2fs %-8s %s" % (rep.duration, rep.when, nodeid))
|
tr.write_line("%02.2fs %-8s %s" % (rep.duration, rep.when, nodeid))
|
||||||
|
|
|
@ -818,6 +818,10 @@ class TestDurations(object):
|
||||||
result.stdout.fnmatch_lines_random(
|
result.stdout.fnmatch_lines_random(
|
||||||
["*durations*", "*call*test_3*", "*call*test_2*"]
|
["*durations*", "*call*test_3*", "*call*test_2*"]
|
||||||
)
|
)
|
||||||
|
assert "test_something" not in result.stdout.str()
|
||||||
|
result.stdout.fnmatch_lines(
|
||||||
|
["(0.00 durations hidden. Use -vv to show these durations.)"]
|
||||||
|
)
|
||||||
|
|
||||||
def test_calls_show_2(self, testdir):
|
def test_calls_show_2(self, testdir):
|
||||||
testdir.makepyfile(self.source)
|
testdir.makepyfile(self.source)
|
||||||
|
|
Loading…
Reference in New Issue