Skip to content

Commit def102a

Browse files
authored
[3.11] gh-115274: Fix direct invocation of testmock/testpatch.py (GH-115275) (#115281)
(cherry picked from commit f8e9c57) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 3aa9621 commit def102a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/unittest/test/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__, 'unittest.test.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)