summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_type_comments.py8
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"):