Author: Armin Rigo <[email protected]>
Branch:
Changeset: r46786:f5be4e07ce87
Date: 2011-08-26 11:34 +0200
http://bitbucket.org/pypy/pypy/changeset/f5be4e07ce87/
Log: A failing test. Thanks to henryl (issue847).
diff --git a/pypy/module/__builtin__/test/test_classobj.py
b/pypy/module/__builtin__/test/test_classobj.py
--- a/pypy/module/__builtin__/test/test_classobj.py
+++ b/pypy/module/__builtin__/test/test_classobj.py
@@ -981,6 +981,34 @@
assert a.x == 2
raises(TypeError, descr.__delete__, a)
+ def test_eq_order(self):
+ class A:
+ def __eq__(self, other): return True
+ def __ne__(self, other): return True
+ def __lt__(self, other): return True
+ def __le__(self, other): return True
+ def __gt__(self, other): return True
+ def __ge__(self, other): return True
+ class B:
+ def __eq__(self, other): return False
+ def __ne__(self, other): return False
+ def __lt__(self, other): return False
+ def __le__(self, other): return False
+ def __gt__(self, other): return False
+ def __ge__(self, other): return False
+ assert A() == B()
+ assert A() != B()
+ assert A() < B()
+ assert A() <= B()
+ assert A() > B()
+ assert A() >= B()
+ assert not (B() == A())
+ assert not (B() != A())
+ assert not (B() < A())
+ assert not (B() <= A())
+ assert not (B() > A())
+ assert not (B() >= A())
+
class AppTestOldStyleClassStrDict(object):
def setup_class(cls):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit