[pypy-commit] pypy py3.5: This case "works", but gives a slightly strange error message
arigo
pypy.commits at gmail.com
Wed Aug 23 12:10:45 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r92227:c30f2d4e721f
Date: 2017-08-23 18:10 +0200
http://bitbucket.org/pypy/pypy/changeset/c30f2d4e721f/
Log: This case "works", but gives a slightly strange error message on
both CPython and PyPy
diff --git a/pypy/objspace/std/test/test_typeobject.py b/pypy/objspace/std/test/test_typeobject.py
--- a/pypy/objspace/std/test/test_typeobject.py
+++ b/pypy/objspace/std/test/test_typeobject.py
@@ -1324,6 +1324,25 @@
assert found == [1]
"""
+ def test_incomplete_extend_3(self): """
+ # this case "works", but gives a slightly strange error message
+ # on both CPython and PyPy
+ class M(type):
+ def mro(cls):
+ if cls.__mro__ is None and cls.__name__ == 'A':
+ try:
+ Base.__new__(cls)
+ except TypeError:
+ found.append(1)
+ return type.mro(cls)
+ found = []
+ class Base(metaclass=M):
+ pass
+ class A(Base):
+ pass
+ assert found == [1]
+ """
+
class AppTestWithMethodCacheCounter:
spaceconfig = {"objspace.std.withmethodcachecounter": True}
More information about the pypy-commit
mailing list