diff options
| author | Benjamin Peterson <benjamin@python.org> | 2015-12-29 16:08:51 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2015-12-29 16:08:51 (GMT) |
| commit | 5aab44b301fff2c6a7f00e24944a3360eedd7aa8 (patch) | |
| tree | ecb11e1fde51fab1d3728a05e05b7edad2931ad8 /Lib | |
| parent | bffa73e582c1a842d91d25ce93055f5e69074764 (diff) | |
| parent | 3cc8f4b9693572e6ea423881cdbebfc981307b50 (diff) | |
| download | cpython-5aab44b301fff2c6a7f00e24944a3360eedd7aa8.zip cpython-5aab44b301fff2c6a7f00e24944a3360eedd7aa8.tar.gz cpython-5aab44b301fff2c6a7f00e24944a3360eedd7aa8.tar.bz2 | |
merge 3.5 (#25973)
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_syntax.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index a22cebb..057441c 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -416,6 +416,14 @@ TODO(jhylton): Figure out how to test SyntaxWarning with doctest. ## ... ## SyntaxWarning: name 'x' is assigned to before nonlocal declaration + From https://bugs.python.org/issue25973 + >>> class A: + ... def f(self): + ... nonlocal __x + Traceback (most recent call last): + ... + SyntaxError: no binding for nonlocal '_A__x' found + This tests assignment-context; there was a bug in Python 2.5 where compiling a complex 'if' (one with 'elif') would fail to notice an invalid suite, |
