summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/testmock
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22138: Fix mock.patch behavior when patching descriptors. RestoreSenthil Kumaran2016-01-091-0/+26
| | | | | | original values after patching. Patch contributed by Sean McCully.
* 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 #23004: mock_open() now reads binary data correctly when the type of ↵Berker Peksag2015-08-061-0/+28
|\ \ | |/ | | | | | | | | read_data is bytes. Initial patch by Aaron Hill.
| * Issue #23004: mock_open() now reads binary data correctly when the type of ↵Berker Peksag2015-08-061-0/+28
| | | | | | | | | | | | read_data is bytes. Initial patch by Aaron Hill.
* | Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-232-3/+25
|\ \ | |/
| * Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-232-3/+25
| |
* | Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-172-2/+21
|\ \ | |/ | | | | could in Python 3.3.
| * Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-172-2/+21
| | | | | | | | 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 #23310: Fix MagicMock's initializer to work with __methods__.Łukasz Langa2015-04-141-0/+15
| | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
* | 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
* | Issue #23310: Fix MagicMock's initializer to work with __methods__.Łukasz Langa2015-04-141-0/+15
| | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
* | Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-0/+15
|\ \ | |/ | | | | Patch by Håkan Lövdahl.
| * Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-0/+15
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #23581: Add matmul support to MagicMock.Berker Peksag2015-03-121-0/+11
| | | | | | | | Patch by Håkan Lövdahl.
* | 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.
* | MergeMichael Foord2014-04-151-1/+18
|\ \ | |/
| * Closes issue 21239. unittest.mock.patch.stopall() did not work ↵Michael Foord2014-04-151-1/+18
| | | | | | | | deterministically when the same name was patched multiple times.
* | MergeKushal Das2014-04-151-0/+4
|\ \ | |/
| * Closes Issue 21222.Kushal Das2014-04-151-0/+4
| | | | | | | | Passing name keyword argument to mock.create_autospec now works.
* | Closes issue 17660. You no longer need to explicitly pass create=True when ↵Michael Foord2014-04-141-2/+22
|/ | | | patching builtin names.
* Issue 17826. Setting an iterable side_effect on a mock created by ↵Michael Foord2014-04-141-0/+18
| | | | create_autospec now works
* Issue 20968. unittest.mock.MagicMock now supports divisionMichael Foord2014-04-141-0/+25
|
* 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-164-19/+19
|\ \
| * | Issue #19594: Use specific asserts in unittest tests.Serhiy Storchaka2013-11-164-19/+19
| | |
* | | Adjust commentAntoine Pitrou2013-09-131-1/+1
| | |
* | | Issue #19013: add a __main__ to unittest.test.testmock to ease CLI invocationAntoine Pitrou2013-09-131-0/+18
| | |
* | | Issue #19013: add unittest.main() epilogs to unittest.mock's own test modulesAntoine Pitrou2013-09-133-2/+4
| |/ |/|
* | 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.
* | Closes issue 17467. Add readline and readlines support to ↵Michael Foord2013-03-201-0/+83
| | | | | | | | unittest.mock.mock_open
* | Issue #17015: When it has a spec, a Mock object now inspects its signature ↵Antoine Pitrou2013-02-022-20/+164
|/ | | | 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
|
* Adding patch.stopall method to unittest.mockMichael Foord2012-06-101-0/+18
|
* Fix exception when calling reset_mock on a mock created with autospecMichael Foord2012-06-092-0/+15
|
* Closes issue 14634. unittest.mock.create_autospec now supports keyword only ↵Michael Foord2012-04-211-1/+14
| | | | arguments.
* Closes issue 14636. mock objects raise exceptions from an iterable side_effectMichael Foord2012-04-211-0/+10
|
* Make unittest.mock.create_autospec resilient against AttributeError on ↵Michael Foord2012-04-131-0/+23
| | | | original object
* unittest.mock.PropertyMock return value and attributes are now standard ↵Michael Foord2012-04-131-0/+11
| | | | MagicMocks
* unittest.mock: a mock created by patch with a spec as the list argument will ↵Michael Foord2012-03-251-0/+20
| | | | be callable if __call__ is in the spec
* Support subclassing unittest.mock._patch and fix various obscure bugs around ↵Michael Foord2012-03-251-7/+102
| | | | patcher spec arguments
* unittest.mock.MagicMock objects are now unorderable by defaultMichael Foord2012-03-251-0/+13
|