summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hp.com>2015-07-14 23:49:43 (GMT)
committerRobert Collins <rbtcollins@hp.com>2015-07-14 23:49:43 (GMT)
commit76d508b5d4bc8d69433956d6ee6309bbc31f3cf7 (patch)
tree361d08e22e4c9a0f854eb8354f2b51c16d0a2c3e /Lib/unittest/test
parentf58f88c4c7df1827a31457da8dbcacd127613ade (diff)
parentb37f43f94b693468d8b3b9dfc84b1930c52a1b61 (diff)
downloadcpython-76d508b5d4bc8d69433956d6ee6309bbc31f3cf7.zip
cpython-76d508b5d4bc8d69433956d6ee6309bbc31f3cf7.tar.gz
cpython-76d508b5d4bc8d69433956d6ee6309bbc31f3cf7.tar.bz2
- 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')
-rw-r--r--Lib/unittest/test/testmock/testmock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index f4a723d..f4fb228 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -246,6 +246,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()