Author: Antonio Cuni <[email protected]>
Branch: int_w-refactor
Changeset: r69461:aeda53c595a1
Date: 2014-02-26 11:23 +0100
http://bitbucket.org/pypy/pypy/changeset/aeda53c595a1/
Log: another test which is now passing
diff --git a/pypy/objspace/std/test/test_intobject.py
b/pypy/objspace/std/test/test_intobject.py
--- a/pypy/objspace/std/test/test_intobject.py
+++ b/pypy/objspace/std/test/test_intobject.py
@@ -553,6 +553,15 @@
assert 3 .__coerce__(4) == (3, 4)
assert 3 .__coerce__(4L) == NotImplemented
+ def test_fake_int_as_base(self):
+ class MyInt(object):
+ def __init__(self, x):
+ self.x = x
+ def __int__(self):
+ return self.x
+
+ base = MyInt(24)
+ assert int('10', base) == 24
class AppTestIntShortcut(AppTestInt):
spaceconfig = {"objspace.std.intshortcut": True}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit