Author: Jeremy Thurgood <[email protected]>
Branch:
Changeset: r68727:6cbefcec4ceb
Date: 2014-01-17 18:39 +0200
http://bitbucket.org/pypy/pypy/changeset/6cbefcec4ceb/
Log: add two more tests for yield-inside-try edge cases
diff --git a/pypy/interpreter/astcompiler/test/test_symtable.py
b/pypy/interpreter/astcompiler/test/test_symtable.py
--- a/pypy/interpreter/astcompiler/test/test_symtable.py
+++ b/pypy/interpreter/astcompiler/test/test_symtable.py
@@ -358,7 +358,9 @@
def test_yield_outside_try(self):
for input in ("try: pass\n except: pass",
+ "try: pass\n except: yield y",
"try: pass\n finally: pass",
+ "try: pass\n finally: yield y",
"with x: pass"):
input = "def f():\n yield y\n %s\n yield y" % (input,)
assert not self.func_scope(input).has_yield_inside_try
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit