Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_operator.py @ 40401:88133417dfd0
- patch #1600346 submitted by Tomer Filiba
- Renamed nb_nonzero slots to nb_bool
- Renamed __nonzero__ methods to __bool__
- update core, lib, docs, and tests to match
| author | Jack Diederich <jackdied@gmail.com> |
|---|---|
| date | Tue, 28 Nov 2006 19:15:13 +0000 |
| parents | 4bfe8afe8f65 |
| children | 1c26505c1de6 |
line wrap: on
line diff
--- a/Lib/test/test_operator.py Wed Nov 22 14:42:41 2006 +0000 +++ b/Lib/test/test_operator.py Tue Nov 28 19:15:13 2006 +0000 @@ -319,7 +319,7 @@ def test_truth(self): class C(object): - def __nonzero__(self): + def __bool__(self): raise SyntaxError self.failUnlessRaises(TypeError, operator.truth) self.failUnlessRaises(SyntaxError, operator.truth, C())
