Author: Manuel Jacob <[email protected]>
Branch: py3k
Changeset: r77728:65968087ea43
Date: 2015-05-31 20:43 +0200
http://bitbucket.org/pypy/pypy/changeset/65968087ea43/
Log: Add a test for another stack depth computation error.
diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py
b/pypy/interpreter/astcompiler/test/test_compiler.py
--- a/pypy/interpreter/astcompiler/test/test_compiler.py
+++ b/pypy/interpreter/astcompiler/test/test_compiler.py
@@ -511,6 +511,21 @@
x *= 7
""", 'x', 42
+ def test_with_bug(self):
+ yield self.simple_test, """
+ class ContextManager:
+ def __enter__(self, *args):
+ return self
+ def __exit__(self, *args):
+ pass
+
+ x = 0
+ with ContextManager():
+ x = 6
+ print(None, None, None, None)
+ x *= 7
+ """, 'x', 42
+
def test_while_loop(self):
yield self.simple_test, """
comments = [42]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit