mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702)
This commit is contained in:
parent
140a7d1f35
commit
793cb85437
3 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue