Skip to content

Commit 2792d6d

Browse files
authored
bpo-46416: Allow direct invocation of Lib/test/test_typing.py (GH-30641)
Use `__name__`
1 parent 3bf6315 commit 2792d6d

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
@@ -5071,7 +5071,7 @@ def test_special_attrs2(self):
50715071
)
50725072
self.assertEqual(
50735073
SpecialAttrsTests.TypeName.__module__,
5074-
'test.test_typing',
5074+
__name__,
50755075
)
50765076
# NewTypes are picklable assuming correct qualname information.
50775077
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
@@ -5085,7 +5085,7 @@ def test_special_attrs2(self):
50855085
# __qualname__ is unnecessary.
50865086
self.assertEqual(SpecialAttrsT.__name__, 'SpecialAttrsT')
50875087
self.assertFalse(hasattr(SpecialAttrsT, '__qualname__'))
5088-
self.assertEqual(SpecialAttrsT.__module__, 'test.test_typing')
5088+
self.assertEqual(SpecialAttrsT.__module__, __name__)
50895089
# Module-level type variables are picklable.
50905090
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
50915091
s = pickle.dumps(SpecialAttrsT, proto)
@@ -5094,7 +5094,7 @@ def test_special_attrs2(self):
50945094

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

0 commit comments

Comments
 (0)