diff options
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r-- | Lib/test/test_syntax.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index b21f6cf..b5a5c5d 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -388,6 +388,12 @@ Misuse of the nonlocal statement can lead to a few unique syntax errors. ... SyntaxError: no binding for nonlocal 'x' found +From SF bug #1705365 + >>> nonlocal x + Traceback (most recent call last): + ... + SyntaxError: nonlocal declaration not allowed at module level + TODO(jhylton): Figure out how to test SyntaxWarning with doctest. ## >>> def f(x): |