- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.

Patch from Nicola Palumbo and Laurent De Buyst.
This commit is contained in:
Robert Collins 2015-07-15 11:49:43 +12:00
commit 76d508b5d4
4 changed files with 17 additions and 3 deletions

View file

@ -246,6 +246,9 @@ def test_reset_mock_recursion(self):
# 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()