]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-104036: Fix direct invocation of test_typing (GH-104037) (#104039)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 1 May 2023 14:17:12 +0000 (07:17 -0700)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 14:17:12 +0000 (14:17 +0000)
gh-104036: Fix direct invocation of test_typing (GH-104037)

Previously, `python -m test test_typing` worked, but `python Lib/test/test_typing.py` did not.
(cherry picked from commit 4181d078fc945313568eb39965cb9190881606b5)

Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Lib/test/test_typing.py

index 79fba267b4bcf2e61f780164016190e01b921add..e46a6ca06200b193c485e11a2fbc4d5439197e0d 100644 (file)
@@ -114,7 +114,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):