summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/testmock/testmock.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-211-3/+14
|\
| * Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-211-3/+14
| |
* | Issue #21271: Adds new keyword only parameters in reset_mock callKushal Das2016-06-021-0/+18
| | | | | | | | | | We now have two keyword only parameters in the reset_mock function to selectively reset the return_value or the side_effects, or both.
* | Issue #26807: mock_open 'files' no longer error on readline at end of file.Robert Collins2016-05-161-0/+12
|\ \ | |/ | | | | Patch from Yolanda Robla.
| * Issue #26807: mock_open 'files' no longer error on readline at end of file.Robert Collins2016-05-161-0/+12
| | | | | | | | Patch from Yolanda Robla.
* | Issue #25195: Fix a regression in mock.MagicMockBerker Peksag2016-03-271-0/+17
|\ \ | |/ | | | | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer.
| * Issue #25195: Fix a regression in mock.MagicMockBerker Peksag2016-03-271-0/+17
| | | | | | | | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer.
* | Add Mock.assert_called()Victor Stinner2016-03-111-0/+21
|/ | | | | Issue #26323: Add assert_called() and assert_called_once() methods to unittest.mock.Mock.
* Issue #24857: Comparing call_args to a long sequence now correctly returns aBerker Peksag2015-09-091-0/+3
|\ | | | | | | | | | | boolean result instead of raising an exception. Patch by A Kaptur.
| * Issue #24857: Comparing call_args to a long sequence now correctly returns aBerker Peksag2015-09-091-0/+3
| | | | | | | | | | | | boolean result instead of raising an exception. Patch by A Kaptur.
* | Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-231-1/+23
|\ \ | |/
| * Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-231-1/+23
| |
* | Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-171-0/+5
|\ \ | |/ | | | | could in Python 3.3.
| * Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-171-0/+5
| | | | | | | | could in Python 3.3.
* | - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.Robert Collins2015-07-141-0/+3
|\ \ | |/ | | | | Patch from Nicola Palumbo and Laurent De Buyst.
| * - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.Robert Collins2015-07-141-0/+3
| | | | | | | | Patch from Nicola Palumbo and Laurent De Buyst.
* | Issue #23661: unittest.mock side_effects can now be exceptions again.Robert Collins2015-07-141-0/+9
| | | | | | | | This was a regression vs Python 3.4. Patch from Ignacio Rossi
* | Closes #21270 : We now override tuple methods in mock.call objects.Kushal Das2014-09-161-0/+10
| |
* | Suppress a couple more DeprecationWarnings in the test suite.R David Murray2014-06-111-1/+1
| |
* | Closes #21256: Printout of keyword args in deterministic order in mock calls.Kushal Das2014-06-091-0/+6
| | | | | | | | | | Printout of keyword args should be in deterministic order in a mock function call. This will help to write better doctests.
* | Closes Issue 21262: New method assert_not_called for Mock.Kushal Das2014-04-161-0/+9
| | | | | | | | It raises AssertionError if the mock has been called.
* | Closes Issue 21238: New keyword argument `unsafe` to Mock.Kushal Das2014-04-161-0/+11
|/ | | | | It raises `AttributeError` incase of an attribute startswith assert or assret.
* Closes Issue 21222.Kushal Das2014-04-151-0/+4
| | | | Passing name keyword argument to mock.create_autospec now works.
* Issue 17826. Setting an iterable side_effect on a mock created by ↵Michael Foord2014-04-141-0/+18
| | | | create_autospec now works
* MergeMichael Foord2013-11-231-15/+2
|\
| * Remove shadowed testMichael Foord2013-09-151-15/+2
| |
* | Issue #19594: Use specific asserts in unittest tests.Serhiy Storchaka2013-11-161-5/+5
|\ \
| * | Issue #19594: Use specific asserts in unittest tests.Serhiy Storchaka2013-11-161-5/+5
| | |
* | | Issue #19013: add unittest.main() epilogs to unittest.mock's own test modulesAntoine Pitrou2013-09-131-1/+0
| |/ |/|
* | Process DEFAULT values in mock side_effect that returns iterator.Andrew Svetlov2013-04-071-0/+4
|\ \ | |/ | | | | Patch by Michael Ford.
| * Process DEFAULT values in mock side_effect that returns iterator.Andrew Svetlov2013-04-071-0/+4
| | | | | | | | Patch by Michael Ford.
* | Issue #17015: When it has a spec, a Mock object now inspects its signature ↵Antoine Pitrou2013-02-021-0/+125
|/ | | | when matching calls, so that arguments can be matched positionally or by name.
* Closes issue 15323. Improve failure message of Mock.assert_called_once_withMichael Foord2012-09-281-0/+7
|
* Closes issue 14636. mock objects raise exceptions from an iterable side_effectMichael Foord2012-04-211-0/+10
|
* Fix another mock importMichael Foord2012-03-141-1/+1
|
* PEP 417: Adding unittest.mockMichael Foord2012-03-141-0/+1258