summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-07-15 05:02:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-07-15 05:02:09 (GMT)
commitce7b27d169f0d8383f99e0b73d6057aae6470e27 (patch)
tree3d1b5eb9ac53d299eb81539a0c80c567cfd0f40b /Lib/test
parent663dacda4d14b9fe05c14ef1bea07cd61d01909d (diff)
parente09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5 (diff)
downloadcpython-ce7b27d169f0d8383f99e0b73d6057aae6470e27.zip
cpython-ce7b27d169f0d8383f99e0b73d6057aae6470e27.tar.gz
cpython-ce7b27d169f0d8383f99e0b73d6057aae6470e27.tar.bz2
merge 3.5 (#27514)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_syntax.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 38fc417..f47bdf9 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -334,7 +334,9 @@ isn't, there should be a syntax error.
...
SyntaxError: 'break' outside loop
-This should probably raise a better error than a SystemError (or none at all).
+This raises a SyntaxError, it used to raise a SystemError.
+Context for this change can be found on issue #27514
+
In 2.5 there was a missing exception and an assert was triggered in a debug
build. The number of blocks must be greater than CO_MAXBLOCKS. SF #1565514
@@ -362,7 +364,7 @@ build. The number of blocks must be greater than CO_MAXBLOCKS. SF #1565514
... break
Traceback (most recent call last):
...
- SystemError: too many statically nested blocks
+ SyntaxError: too many statically nested blocks
Misuse of the nonlocal statement can lead to a few unique syntax errors.