[pypy-svn] r66402 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test
benjamin at codespeak.net
benjamin at codespeak.net
Sat Jul 18 23:55:42 CEST 2009
Author: benjamin
Date: Sat Jul 18 23:55:41 2009
New Revision: 66402
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_compiler.py
Log:
add a test for deleting cells
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_compiler.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_compiler.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_compiler.py Sat Jul 18 23:55:41 2009
@@ -413,6 +413,14 @@
decl = str(decl) + "\n"
yield self.st, decl, 'x', (1, 2, 3, 4)
+ source = """def f(a):
+ del a
+ def x():
+ a
+"""
+ exc = py.test.raises(SyntaxError, self.run, source).value
+ assert exc.msg == "Can't delete variable used in nested scopes: 'a'"
+
def test_try_except_finally(self):
yield self.simple_test, """
try:
More information about the Pypy-commit
mailing list