This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients michael.foord
Date 2013-03-21.03:05:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za>
In-reply-to
Content
An iterator set as a mock side_effect should be able to include mock.DEFAULT to use the standard return value.


    def test_side_effect_iterator_default(self):
        mock = Mock(return_value=2)
        mock.side_effect = [1, DEFAULT]
        result = mock(), mock()
        self.assertEqual(result, (1, 2))
History
Date User Action Args
2013-03-21 03:05:40michael.foordsetrecipients: + michael.foord
2013-03-21 03:05:40michael.foordsetmessageid: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za>
2013-03-21 03:05:40michael.foordlinkissue17502 messages
2013-03-21 03:05:40michael.foordcreate