]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275)
authorNikita Sobolev <mail@sobolevn.me>
Sun, 11 Feb 2024 08:51:25 +0000 (11:51 +0300)
committerGitHub <noreply@github.com>
Sun, 11 Feb 2024 08:51:25 +0000 (11:51 +0300)
Lib/test/test_unittest/testmock/testpatch.py

index 833d7da1f31a20677b17118de3764f68e5cb0c75..d0046d702a53f420ec329c0b6da6fbcc2a634d06 100644 (file)
@@ -1912,7 +1912,7 @@ class PatchTest(unittest.TestCase):
 
         with patch.object(foo, '__module__', "testpatch2"):
             self.assertEqual(foo.__module__, "testpatch2")
-        self.assertEqual(foo.__module__, 'test.test_unittest.testmock.testpatch')
+        self.assertEqual(foo.__module__, __name__)
 
         with patch.object(foo, '__annotations__', dict([('s', 1, )])):
             self.assertEqual(foo.__annotations__, dict([('s', 1, )]))