]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104057: Fix direct invocation of test_module (GH-104059)
authorKirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Mon, 1 May 2023 20:17:47 +0000 (23:17 +0300)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 20:17:47 +0000 (20:17 +0000)
Lib/test/test_module.py

index 70e4efea69359a135449be65aa945a45d966aa15..c7eb92290e1b6d1f9acbfeeb61e403ca617b0616 100644 (file)
@@ -236,7 +236,7 @@ a = A(destroyed)"""
         # Yes, a class not an instance.
         m.__loader__ = FullLoader
         self.assertEqual(
-            repr(m), "<module 'foo' (<class 'test.test_module.FullLoader'>)>")
+            repr(m), f"<module 'foo' (<class '{__name__}.FullLoader'>)>")
 
     def test_module_repr_with_bare_loader_and_filename(self):
         m = ModuleType('foo')