diff options
author | Robert Collins <rbtcollins@hp.com> | 2015-07-15 11:42:28 +1200 |
---|---|---|
committer | Robert Collins <rbtcollins@hp.com> | 2015-07-15 11:42:28 +1200 |
commit | b37f43f94b693468d8b3b9dfc84b1930c52a1b61 (patch) | |
tree | 172fa92019a9728252f64417321ecb9fee36cef4 /Lib/unittest/test/testmock/testmock.py | |
parent | acb3a4d88bdee64096ed4f00c9d464b6b4513658 (diff) | |
download | cpython-b37f43f94b693468d8b3b9dfc84b1930c52a1b61.tar.gz cpython-b37f43f94b693468d8b3b9dfc84b1930c52a1b61.zip |
- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
Patch from Nicola Palumbo and Laurent De Buyst.
Diffstat (limited to 'Lib/unittest/test/testmock/testmock.py')
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 23675b9af6b..4fe63149136 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -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() |