Skip to content

Commit 6e13e50

Browse files
[3.12] gh-115274: Fix direct invocation of testmock/testpatch.py (GH-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]>
1 parent 5baf90e commit 6e13e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_unittest/testmock/testpatch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ def foo(x=0):
19121912

19131913
with patch.object(foo, '__module__', "testpatch2"):
19141914
self.assertEqual(foo.__module__, "testpatch2")
1915-
self.assertEqual(foo.__module__, 'test.test_unittest.testmock.testpatch')
1915+
self.assertEqual(foo.__module__, __name__)
19161916

19171917
with patch.object(foo, '__annotations__', dict([('s', 1, )])):
19181918
self.assertEqual(foo.__annotations__, dict([('s', 1, )]))

0 commit comments

Comments
 (0)