commit
51dd738b1a
1
AUTHORS
1
AUTHORS
|
@ -127,6 +127,7 @@ Katerina Koukiou
|
|||
Kevin Cox
|
||||
Kodi B. Arfer
|
||||
Kostis Anagnostopoulos
|
||||
Kristoffer Nordström
|
||||
Kyle Altendorf
|
||||
Lawrence Mitchell
|
||||
Lee Kamentsky
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
The number of *selected* tests now are also displayed when the ``-k`` or ``-m`` flags are used.
|
|
@ -497,6 +497,7 @@ class TerminalReporter(object):
|
|||
errors = len(self.stats.get("error", []))
|
||||
skipped = len(self.stats.get("skipped", []))
|
||||
deselected = len(self.stats.get("deselected", []))
|
||||
selected = self._numcollected - errors - skipped - deselected
|
||||
if final:
|
||||
line = "collected "
|
||||
else:
|
||||
|
@ -510,6 +511,8 @@ class TerminalReporter(object):
|
|||
line += " / %d deselected" % deselected
|
||||
if skipped:
|
||||
line += " / %d skipped" % skipped
|
||||
if self._numcollected > selected > 0:
|
||||
line += " / %d selected" % selected
|
||||
if self.isatty:
|
||||
self.rewrite(line, bold=True, erase=True)
|
||||
if final:
|
||||
|
|
|
@ -418,7 +418,7 @@ class TestLastFailed(object):
|
|||
result = testdir.runpytest("--lf")
|
||||
result.stdout.fnmatch_lines(
|
||||
[
|
||||
"collected 4 items / 2 deselected",
|
||||
"collected 4 items / 2 deselected / 2 selected",
|
||||
"run-last-failure: rerun previous 2 failures",
|
||||
"*2 failed, 2 deselected in*",
|
||||
]
|
||||
|
|
|
@ -474,7 +474,7 @@ class TestTerminalFunctional(object):
|
|||
)
|
||||
result = testdir.runpytest("-k", "test_two:", testpath)
|
||||
result.stdout.fnmatch_lines(
|
||||
["collected 3 items / 1 deselected", "*test_deselected.py ..*"]
|
||||
["collected 3 items / 1 deselected / 2 selected", "*test_deselected.py ..*"]
|
||||
)
|
||||
assert result.ret == 0
|
||||
|
||||
|
@ -498,7 +498,7 @@ class TestTerminalFunctional(object):
|
|||
result = testdir.runpytest("-m", "not foo")
|
||||
result.stdout.fnmatch_lines(
|
||||
[
|
||||
"collected 3 items / 1 deselected",
|
||||
"collected 3 items / 1 deselected / 2 selected",
|
||||
"*test_show_deselected.py ..*",
|
||||
"*= 2 passed, 1 deselected in * =*",
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue