Merge pull request #7141 from bluetech/rm-nonzero
This commit is contained in:
commit
0b78983197
|
@ -38,8 +38,6 @@ class MarkEvaluator:
|
|||
# don't cache here to prevent staleness
|
||||
return bool(self._get_marks())
|
||||
|
||||
__nonzero__ = __bool__
|
||||
|
||||
def wasvalid(self):
|
||||
return not hasattr(self, "exc")
|
||||
|
||||
|
|
|
@ -640,10 +640,10 @@ class TestAssertionRewrite:
|
|||
|
||||
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):
|
||||
|
|
Loading…
Reference in New Issue