Author: Antonio Cuni <[email protected]>
Branch: int_w-refactor
Changeset: r69457:de5ea5e1d969
Date: 2014-02-26 10:30 +0100
http://bitbucket.org/pypy/pypy/changeset/de5ea5e1d969/

Log:    add a test which is now passing, but failed before this branch

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
@@ -721,8 +721,19 @@
                 return CannotConvertToBool()
         x = X()
         raises(MyError, "'foo' in x")
-        
-            
+
+    def test___cmp___fake_int(self):
+        class MyInt(object):
+            def __init__(self, x):
+                self.x = x
+            def __int__(self):
+                return self.x
+        class X(object):
+            def __cmp__(self, other):
+                return MyInt(0)
+
+        assert X() == 'hello'
+
 
 class AppTestWithBuiltinShortcut(AppTest_Descroperation):
     spaceconfig = {'objspace.std.builtinshortcut': True}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to