Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88780:ef0611f31503
Date: 2016-11-30 17:19 +0100
http://bitbucket.org/pypy/pypy/changeset/ef0611f31503/
Log: A test for super() with no argument, which I don't expect to pass
*at all* so far
diff --git a/pypy/module/pypyjit/test_pypy_c/test_instance.py
b/pypy/module/pypyjit/test_pypy_c/test_instance.py
--- a/pypy/module/pypyjit/test_pypy_c/test_instance.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_instance.py
@@ -320,3 +320,29 @@
--TICK--
jump(..., descr=...)
""")
+
+ def test_super_no_args(self):
+ def main():
+ class A(object):
+ def m(self, x):
+ return x + 1
+ class B(A):
+ def m(self, x):
+ return super().m(x)
+ i = 0
+ while i < 300:
+ i = B().m(i)
+ return i
+
+ log = self.run(main, [])
+ loop, = log.loops_by_filename(self.filepath)
+ assert loop.match("""
+ i78 = int_lt(i72, 300)
+ guard_true(i78, descr=...)
+ guard_not_invalidated(descr=...)
+ i79 = force_token()
+ i80 = force_token()
+ i81 = int_add(i72, 1)
+ --TICK--
+ jump(..., descr=...)
+ """)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit