[pypy-svn] pypy default: Merge heads
amauryfa
commits-noreply at bitbucket.org
Tue Feb 1 00:43:44 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r41510:77f94f44989a
Date: 2011-02-01 00:41 +0100
http://bitbucket.org/pypy/pypy/changeset/77f94f44989a/
Log: Merge heads
diff --git a/pypy/objspace/std/test/test_complexobject.py b/pypy/objspace/std/test/test_complexobject.py
--- a/pypy/objspace/std/test/test_complexobject.py
+++ b/pypy/objspace/std/test/test_complexobject.py
@@ -439,6 +439,15 @@
def test_getnewargs(self):
assert (1+2j).__getnewargs__() == (1.0, 2.0)
+ def test_method_not_found_on_newstyle_instance(self):
+ class A(object):
+ pass
+ a = A()
+ a.__complex__ = lambda: 5j # ignored
+ raises(TypeError, complex, a)
+ A.__complex__ = lambda self: 42j
+ assert complex(a) == 42j
+
def test_format(self):
skip("FIXME")
# empty format string is same as str()
More information about the Pypy-commit
mailing list