summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-19 15:35:26 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-19 15:35:26 (GMT)
commit4779399e9f4ff6fe7734fa9931aa6df82a98da24 (patch)
treebb5da06b7e75258f69c244e73ad9e5a91fdc5fe9 /Lib/test/test_scope.py
parentc348cd751846ddc8cec61c47928867e30d94549c (diff)
downloadcpython-4779399e9f4ff6fe7734fa9931aa6df82a98da24.zip
cpython-4779399e9f4ff6fe7734fa9931aa6df82a98da24.tar.gz
cpython-4779399e9f4ff6fe7734fa9931aa6df82a98da24.tar.bz2
Add test for syntax error on "x = 1 + 1".
Move check_syntax() function into test_support.
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 7fd561b..322431d 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -1,4 +1,4 @@
-from test.test_support import verify, TestFailed
+from test.test_support import verify, TestFailed, check_syntax
print "1. simple nesting"
@@ -177,14 +177,6 @@ verify(f(6) == 720)
print "11. unoptimized namespaces"
-def check_syntax(s):
- try:
- compile(s, '?', 'exec')
- except SyntaxError:
- pass
- else:
- raise TestFailed
-
check_syntax("""def unoptimized_clash1(strip):
def f(s):
from string import *