gh-115274: Fix direct invocation of testmock/testpatch.py (#115275)

This commit is contained in:
Nikita Sobolev 2024-02-11 11:51:25 +03:00 committed by GitHub
parent 1f23837277
commit f8e9c57067
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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, )]))