Skip to content

Commit

Permalink
Merge pull request pytest-dev#7141 from bluetech/rm-nonzero
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed May 2, 2020
2 parents 5afa871 + 409ffce commit 0b78983
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/_pytest/mark/evaluate.py
Expand Up @@ -38,8 +38,6 @@ def __bool__(self):
# don't cache here to prevent staleness
return bool(self._get_marks())

__nonzero__ = __bool__

def wasvalid(self):
return not hasattr(self, "exc")

Expand Down
4 changes: 2 additions & 2 deletions testing/test_assertrewrite.py
Expand Up @@ -640,10 +640,10 @@ def f():

assert getmsg(f) == "assert 5 <= 4"

def test_assert_raising_nonzero_in_comparison(self):
def test_assert_raising__bool__in_comparison(self):
def f():
class A:
def __nonzero__(self):
def __bool__(self):
raise ValueError(42)

def __lt__(self, other):
Expand Down

0 comments on commit 0b78983

Please sign in to comment.