mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
Patch from Nicola Palumbo and Laurent De Buyst.
This commit is contained in:
parent
acb3a4d88b
commit
b37f43f94b
4 changed files with 17 additions and 3 deletions
|
@ -237,6 +237,9 @@ class MockTest(unittest.TestCase):
|
|||
# used to cause recursion
|
||||
mock.reset_mock()
|
||||
|
||||
def test_reset_mock_on_mock_open_issue_18622(self):
|
||||
a = mock.mock_open()
|
||||
a.reset_mock()
|
||||
|
||||
def test_call(self):
|
||||
mock = Mock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue