Skip to content

Commit 569ca27

Browse files
authored
gh-96624: Fix test_dotted_but_module_not_loaded in testpatch.py (GH-96691)
* Update test_dotted_but_module_not_loaded to reflect the move of unittest.test to test.test_unittest.
1 parent df50938 commit 569ca27

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/test_unittest/testmock/testpatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ def test_dotted_but_module_not_loaded(self):
19231923
del sys.modules['test.test_unittest.testmock.support']
19241924
del sys.modules['test.test_unittest.testmock']
19251925
del sys.modules['test.test_unittest']
1926-
del sys.modules['unittest']
1926+
del sys.modules['test']
19271927

19281928
# now make sure we can patch based on a dotted path:
19291929
@patch('test.test_unittest.testmock.support.X')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed the failure of repeated runs of ``test.test_unittest`` caused by side effects in ``test_dotted_but_module_not_loaded``.

0 commit comments

Comments
 (0)