Skip to content

Commit

Permalink
[3.12] gh-115274: Fix direct invocation of testmock/testpatch.py (G…
Browse files Browse the repository at this point in the history
…H-115275) (#115280)

gh-115274: Fix direct invocation of `testmock/testpatch.py` (GH-115275)
(cherry picked from commit f8e9c57)

Co-authored-by: Nikita Sobolev <[email protected]>
  • Loading branch information
miss-islington and sobolevn authored Feb 11, 2024
1 parent 5baf90e commit 6e13e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_unittest/testmock/testpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ def foo(x=0):

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, )]))
Expand Down

0 comments on commit 6e13e50

Please sign in to comment.