From: Nikita Sobolev Date: Sun, 11 Feb 2024 08:51:25 +0000 (+0300) Subject: gh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275) X-Git-Tag: v3.13.0a4~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8e9c57067e32baab4ed2fd824b892c52ecb7225;p=thirdparty%2FPython%2Fcpython.git gh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275) --- diff --git a/Lib/test/test_unittest/testmock/testpatch.py b/Lib/test/test_unittest/testmock/testpatch.py index 833d7da1f31a..d0046d702a53 100644 --- a/Lib/test/test_unittest/testmock/testpatch.py +++ b/Lib/test/test_unittest/testmock/testpatch.py @@ -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, )]))