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
1 changed files with 1 additions and 1 deletions

View 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')