- 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:42:28 +12:00
parent acb3a4d88b
commit b37f43f94b
4 changed files with 17 additions and 3 deletions

View file

@ -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()