diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_generators.py | 2 | ||||
-rw-r--r-- | Lib/test/test_scope.py | 14 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index 1b5dfb0..a5b2c37 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -1,5 +1,3 @@ -from __future__ import nested_scopes - tutorial_tests = """ Let's try a simple generator: diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py index fb53790..cb06036 100644 --- a/Lib/test/test_scope.py +++ b/Lib/test/test_scope.py @@ -1,5 +1,3 @@ -from __future__ import nested_scopes - from test.test_support import verify, TestFailed, check_syntax print "1. simple nesting" @@ -179,7 +177,7 @@ verify(f(6) == 720) print "11. unoptimized namespaces" -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def unoptimized_clash1(strip): def f(s): from string import * @@ -187,7 +185,7 @@ def unoptimized_clash1(strip): return f """) -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def unoptimized_clash2(): from string import * def f(s): @@ -195,7 +193,7 @@ def unoptimized_clash2(): return f """) -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def unoptimized_clash2(): from string import * def g(): @@ -205,7 +203,7 @@ def unoptimized_clash2(): """) # XXX could allow this for exec with const argument, but what's the point -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def error(y): exec "a = 1" def f(x): @@ -213,14 +211,14 @@ def error(y): return f """) -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def f(x): def g(): return x del x # can't del name """) -check_syntax("""from __future__ import nested_scopes +check_syntax("""\ def f(): def g(): from string import * |