summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dataclasses.py
diff options
context:
space:
mode:
authorSamuel Colvin <samcolvin@gmail.com>2019-10-13 11:45:36 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-10-13 11:45:36 (GMT)
commit793cb85437299a3da3d74fe65480d720af330cbb (patch)
treeaf1f297dba6baeb54bdb6838e840f79604d39b6d /Lib/test/test_dataclasses.py
parent140a7d1f3579e778656a6b6bfad72489e9870a4d (diff)
downloadcpython-793cb85437299a3da3d74fe65480d720af330cbb.zip
cpython-793cb85437299a3da3d74fe65480d720af330cbb.tar.gz
cpython-793cb85437299a3da3d74fe65480d720af330cbb.tar.bz2
bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702)
Diffstat (limited to 'Lib/test/test_dataclasses.py')
-rw-r--r--Lib/test/test_dataclasses.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 037bf4c..238335e 100644
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -1102,6 +1102,8 @@ class TestCase(unittest.TestCase):
# Make sure the repr is correct.
self.assertEqual(repr(InitVar[int]), 'dataclasses.InitVar[int]')
+ self.assertEqual(repr(InitVar[List[int]]),
+ 'dataclasses.InitVar[typing.List[int]]')
def test_init_var_inheritance(self):
# Note that this deliberately tests that a dataclass need not