Skip to content

Commit

Permalink
Merge pull request #1779 from RonnyPfannschmidt/deselect-no-reason
Browse files Browse the repository at this point in the history
terminal: dont pretend to know the deselection reason
  • Loading branch information
nicoddemus authored Aug 2, 2016
2 parents 9540106 + 1c8fe96 commit ea6191a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ time or change existing behaviors in order to make them less surprising/more use

* Add stderr write for ``pytest.exit(msg)`` during startup. Previously the message was never shown.
Thanks `@BeyondEvil`_ for reporting `#1210`_. Thanks to `@JonathonSonesen`_ and
`@tomviner`_ for PR.
`@tomviner`_ for the PR.

* fix `#1372`_ no longer display the incorrect test deselection reason,
thanks `@ronnypfannschmidt`_ for the PR.

*

Expand Down Expand Up @@ -311,6 +314,7 @@ time or change existing behaviors in order to make them less surprising/more use
.. _#1210: https://github.com/pytest-dev/pytest/issues/1210
.. _#1235: https://github.com/pytest-dev/pytest/issues/1235
.. _#1351: https://github.com/pytest-dev/pytest/issues/1351
.. _#1372: https://github.com/pytest-dev/pytest/issues/1372
.. _#1421: https://github.com/pytest-dev/pytest/issues/1421
.. _#1426: https://github.com/pytest-dev/pytest/issues/1426
.. _#1428: https://github.com/pytest-dev/pytest/pull/1428
Expand Down
12 changes: 2 additions & 10 deletions _pytest/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,8 @@ def summary_stats(self):

def summary_deselected(self):
if 'deselected' in self.stats:
l = []
k = self.config.option.keyword
if k:
l.append("-k%s" % k)
m = self.config.option.markexpr
if m:
l.append("-m %r" % m)
if l:
self.write_sep("=", "%d tests deselected by %r" % (
len(self.stats['deselected']), " ".join(l)), bold=True)
self.write_sep("=", "%d tests deselected" % (
len(self.stats['deselected'])), bold=True)

def repr_pythonversion(v=None):
if v is None:
Expand Down
2 changes: 1 addition & 1 deletion testing/test_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def test_three():
result = testdir.runpytest("-k", "test_two:", testpath)
result.stdout.fnmatch_lines([
"*test_deselected.py ..",
"=* 1 test*deselected by*test_two:*=",
"=* 1 test*deselected *=",
])
assert result.ret == 0

Expand Down

0 comments on commit ea6191a

Please sign in to comment.