diff options
author | Guido van Rossum <guido@python.org> | 2019-03-07 12:13:15 -0800 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2019-03-07 12:13:15 -0800 |
commit | e925175040f0f55b6fadf7cd03bd77fb17650b39 (patch) | |
tree | e941cf2c11185e0f589a6f5f0503ae8c85d31b34 | |
parent | c8c84f44b66b087eadde48f9b2e033bf289cf353 (diff) | |
download | cpython-git-feature-version.tar.gz |
Add test for underscore in numberfeature-version
-rw-r--r-- | Lib/test/test_type_comments.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_type_comments.py b/Lib/test/test_type_comments.py index 7f71ee851d..cac6e8b25d 100644 --- a/Lib/test/test_type_comments.py +++ b/Lib/test/test_type_comments.py @@ -40,6 +40,10 @@ a = 42 f"{a}" """ +underscorednumber = """\ +a = 42_42_42 +""" + redundantdef = """\ def foo(): # type: () -> int # type: () -> str @@ -229,6 +233,10 @@ class TypeCommentTests(unittest.TestCase): for tree in self.parse_all(fstring, minver=6): pass + def test_underscorednumber(self): + for tree in self.parse_all(underscorednumber, minver=6): + pass + def test_redundantdef(self): for tree in self.parse_all(redundantdef, maxver=0, expected_regex="^Cannot have two type comments on def"): |