Skip to content

Commit 144c952

Browse files
committed
[3.10] bpo-46416: Allow direct invocation of Lib/test/test_typing.py (pythonGH-30641)
Use `__name__` (cherry picked from commit 2792d6d) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent c4fe0aa commit 144c952

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_typing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4982,7 +4982,7 @@ def test_special_attrs2(self):
49824982
)
49834983
self.assertEqual(
49844984
SpecialAttrsTests.TypeName.__module__,
4985-
'test.test_typing',
4985+
__name__,
49864986
)
49874987
# NewTypes are picklable assuming correct qualname information.
49884988
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
@@ -4996,7 +4996,7 @@ def test_special_attrs2(self):
49964996
# __qualname__ is unnecessary.
49974997
self.assertEqual(SpecialAttrsT.__name__, 'SpecialAttrsT')
49984998
self.assertFalse(hasattr(SpecialAttrsT, '__qualname__'))
4999-
self.assertEqual(SpecialAttrsT.__module__, 'test.test_typing')
4999+
self.assertEqual(SpecialAttrsT.__module__, __name__)
50005000
# Module-level type variables are picklable.
50015001
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
50025002
s = pickle.dumps(SpecialAttrsT, proto)
@@ -5005,7 +5005,7 @@ def test_special_attrs2(self):
50055005

50065006
self.assertEqual(SpecialAttrsP.__name__, 'SpecialAttrsP')
50075007
self.assertFalse(hasattr(SpecialAttrsP, '__qualname__'))
5008-
self.assertEqual(SpecialAttrsP.__module__, 'test.test_typing')
5008+
self.assertEqual(SpecialAttrsP.__module__, __name__)
50095009
# Module-level ParamSpecs are picklable.
50105010
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
50115011
s = pickle.dumps(SpecialAttrsP, proto)

0 commit comments

Comments
 (0)