gh-104057: Fix direct invocation of test_module (GH-104059)

This commit is contained in:
Kirill Podoprigora 2023-05-01 23:17:47 +03:00 committed by GitHub
parent e665563f83
commit d448fcb032
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,7 +236,7 @@ def test_module_repr_with_full_loader(self):
# 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')