diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Lib/test/test_compile.py | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 11 |
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): |