summaryrefslogtreecommitdiff
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2017-01-29 10:16:28 +0000
committerMartin Panter <vadmium+py@gmail.com>2017-01-29 10:16:28 +0000
commit23352add84278fc0476b2d6599489fbb70c9f5bc (patch)
tree600bf5132e46d31b69efbd3bbc8a3d37159c0744 /Lib/test/test_compile.py
parent6d1d733828b49eb03d45da81c6b8c6b849fbc5df (diff)
parent0fb1e3c9fc84c62a91f1e5889dc8e0855cefa4ae (diff)
downloadcpython-23352add84278fc0476b2d6599489fbb70c9f5bc.tar.gz
Issues #29349: Merge Py 2 fix 3.6
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index da1db1567b..b4a52a5310 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -401,16 +401,9 @@ if 1:
self.assertNotIn((Ellipsis, Ellipsis), d)
def test_annotation_limit(self):
- # 16 bits are available for # of annotations, but only 8 bits are
- # available for the parameter count, hence 255
- # is the max. Ensure the result of too many annotations is a
- # SyntaxError.
+ # more than 255 annotations, should compile ok
s = "def f(%s): pass"
- s %= ', '.join('a%d:%d' % (i,i) for i in range(256))
- self.assertRaises(SyntaxError, compile, s, '?', 'exec')
- # Test that the max # of annotations compiles.
- s = "def f(%s): pass"
- s %= ', '.join('a%d:%d' % (i,i) for i in range(255))
+ s %= ', '.join('a%d:%d' % (i,i) for i in range(300))
compile(s, '?', 'exec')
def test_mangling(self):