Don't crash when nonlocal is used at module level (fixes SF#1705365)
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 @@
...
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):