diff options
Diffstat (limited to 'Lib/unittest/test/testmock/testmock.py')
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 2c6f128..3d0776c 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -906,6 +906,10 @@ class MockTest(unittest.TestCase): self.assertRaises(StopIteration, mock) self.assertIs(mock.side_effect, this_iter) + def test_side_effect_iterator_default(self): + mock = Mock(return_value=2) + mock.side_effect = iter([1, DEFAULT]) + self.assertEqual([mock(), mock()], [1, 2]) def test_assert_has_calls_any_order(self): mock = Mock() |