[Python-checkins] [3.11] gh-104036: Fix direct invocation of test_typing (GH-104037) (#104039)
AlexWaygood
webhook-mailer at python.org
Mon May 1 10:17:19 EDT 2023
https://github.com/python/cpython/commit/1be8bed236e841f33e10092aa2e774dd90d74c9b
commit: 1be8bed236e841f33e10092aa2e774dd90d74c9b
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-05-01T14:17:12Z
summary:
[3.11] gh-104036: Fix direct invocation of test_typing (GH-104037) (#104039)
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 at users.noreply.github.com>
files:
M Lib/test/test_typing.py
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 79fba267b4bc..e46a6ca06200 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -114,7 +114,7 @@ def test_repr(self):
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):
More information about the Python-checkins
mailing list