]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104036: Fix direct invocation of test_typing (#104037)
authorKirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Mon, 1 May 2023 13:42:59 +0000 (16:42 +0300)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 13:42:59 +0000 (13:42 +0000)
Previously, `python -m test test_typing` worked, but `python Lib/test/test_typing.py` did not.

Lib/test/test_typing.py

index f36bb958c88ef9e6952ba8f263e8132523689534..7c6a521c3c48f86a4f2ca8cab23c925d973a5d9d 100644 (file)
@@ -117,7 +117,7 @@ class AnyTests(BaseTestCase):
         class Sub(Any): pass
         self.assertEqual(
             repr(Sub),
-            "<class 'test.test_typing.AnyTests.test_repr.<locals>.Sub'>",
+            f"<class '{__name__}.AnyTests.test_repr.<locals>.Sub'>",
         )
 
     def test_errors(self):