Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57591:95fa50c86cb3
Date: 2012-09-26 00:28 +0200
http://bitbucket.org/pypy/pypy/changeset/95fa50c86cb3/
Log: Remove a test which does not make sense now that int==long. Also fix
an old __nonzero__ method.
diff --git a/pypy/objspace/test/test_descroperation.py
b/pypy/objspace/test/test_descroperation.py
--- a/pypy/objspace/test/test_descroperation.py
+++ b/pypy/objspace/test/test_descroperation.py
@@ -601,14 +601,6 @@
method = A.method
assert Dict().method() == 42
- def test_truth_of_int(self):
- class X(object):
- def __len__(self): return 1
- __bool__ = __len__
- raises(TypeError, bool, X())
- del X.__bool__
- assert X()
-
def test_len_overflow(self):
import sys
class X(object):
@@ -674,7 +666,7 @@
class MyError(Exception):
pass
class CannotConvertToBool(object):
- def __nonzero__(self):
+ def __bool__(self):
raise MyError
class X(object):
def __contains__(self, item):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit