Skip to content

Commit

Permalink
gh-96624: Fix test_dotted_but_module_not_loaded in testpatch.py (GH-9…
Browse files Browse the repository at this point in the history
…6691)

* Update test_dotted_but_module_not_loaded to reflect the move of unittest.test to test.test_unittest.
  • Loading branch information
sweeneyde authored Sep 9, 2022
1 parent df50938 commit 569ca27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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 @@ -1923,7 +1923,7 @@ def test_dotted_but_module_not_loaded(self):
del sys.modules['test.test_unittest.testmock.support']
del sys.modules['test.test_unittest.testmock']
del sys.modules['test.test_unittest']
del sys.modules['unittest']
del sys.modules['test']

# now make sure we can patch based on a dotted path:
@patch('test.test_unittest.testmock.support.X')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the failure of repeated runs of ``test.test_unittest`` caused by side effects in ``test_dotted_but_module_not_loaded``.

0 comments on commit 569ca27

Please sign in to comment.