Commits

Armin Rigo committed f5be4e0

A failing test. Thanks to henryl (issue847).

  • Participants
  • Parent commits e041b75

Comments (0)

Files changed (1)

pypy/module/__builtin__/test/test_classobj.py

         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):