Skip to content

Commit eaeb994

Browse files
authored
[3.10] bpo-46416: Allow direct invocation of Lib/test/test_typing.py (GH-30641) (GH-30697)
Use `__name__` (cherry picked from commit 2792d6d) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent b2c7fe1 commit eaeb994

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
@@ -5067,7 +5067,7 @@ def test_special_attrs2(self):
50675067
)
50685068
self.assertEqual(
50695069
SpecialAttrsTests.TypeName.__module__,
5070-
'test.test_typing',
5070+
__name__,
50715071
)
50725072
# NewTypes are picklable assuming correct qualname information.
50735073
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
@@ -5081,7 +5081,7 @@ def test_special_attrs2(self):
50815081
# __qualname__ is unnecessary.
50825082
self.assertEqual(SpecialAttrsT.__name__, 'SpecialAttrsT')
50835083
self.assertFalse(hasattr(SpecialAttrsT, '__qualname__'))
5084-
self.assertEqual(SpecialAttrsT.__module__, 'test.test_typing')
5084+
self.assertEqual(SpecialAttrsT.__module__, __name__)
50855085
# Module-level type variables are picklable.
50865086
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
50875087
s = pickle.dumps(SpecialAttrsT, proto)
@@ -5090,7 +5090,7 @@ def test_special_attrs2(self):
50905090

50915091
self.assertEqual(SpecialAttrsP.__name__, 'SpecialAttrsP')
50925092
self.assertFalse(hasattr(SpecialAttrsP, '__qualname__'))
5093-
self.assertEqual(SpecialAttrsP.__module__, 'test.test_typing')
5093+
self.assertEqual(SpecialAttrsP.__module__, __name__)
50945094
# Module-level ParamSpecs are picklable.
50955095
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
50965096
s = pickle.dumps(SpecialAttrsP, proto)

0 commit comments

Comments
 (0)