summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/mock.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-1/+3
|\ | | | | | | Patch by Håkan Lövdahl.
| * Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-1/+3
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #23581: Add matmul support to MagicMock.Berker Peksag2015-03-121-1/+1
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #23326: Removed __ne__ implementations. Since fixing default __ne__Serhiy Storchaka2015-01-311-4/+0
| | | | | | | | implementation in issue #21408 they are redundant.
* | Issue #22823: Fix typo in unittest/mock.pyVictor Stinner2014-12-111-1/+1
| |
* | Issue #22823: Use set literals instead of creating a set from a list.Serhiy Storchaka2014-12-111-16/+15
| | | | | | | | Fixed an output of sets in examples.
* | Closes #21270 : We now override tuple methods in mock.call objects.Kushal Das2014-09-161-0/+6
| |
* | Closes #21256: Printout of keyword args in deterministic order in mock calls.Kushal Das2014-06-091-1/+1
| | | | | | | | | | Printout of keyword args should be in deterministic order in a mock function call. This will help to write better doctests.
* | Removes unused varargs and varkwargs from assert_not_called().Kushal Das2014-04-161-1/+1
| |
* | Closes Issue 21262: New method assert_not_called for Mock.Kushal Das2014-04-161-0/+8
| | | | | | | | It raises AssertionError if the mock has been called.
* | Closes Issue 21238: New keyword argument `unsafe` to Mock.Kushal Das2014-04-161-2/+6
| | | | | | | | | | It raises `AttributeError` incase of an attribute startswith assert or assret.
* | MergeMichael Foord2014-04-151-5/+10
|\ \ | |/
| * Closes issue 21239. unittest.mock.patch.stopall() did not work ↵Michael Foord2014-04-151-5/+10
| | | | | | | | deterministically when the same name was patched multiple times.
* | MergeKushal Das2014-04-151-0/+2
|\ \ | |/
| * Closes Issue 21222.Kushal Das2014-04-151-0/+2
| | | | | | | | 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-0/+7
|/ | | | patching builtin names.
* Issue 17826. Setting an iterable side_effect on a mock created by ↵Michael Foord2014-04-141-2/+13
| | | | create_autospec now works
* Issue 20968. unittest.mock.MagicMock now supports divisionMichael Foord2014-04-141-1/+3
|
* Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-3/+16
| | | | | | PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type) have been modified to provide introspection information for builtins. Also: many additional Lib, test suite, and Argument Clinic fixes.
* Process DEFAULT values in mock side_effect that returns iterator.Andrew Svetlov2013-04-071-0/+2
|\ | | | | | | Patch by Michael Ford.
| * Process DEFAULT values in mock side_effect that returns iterator.Andrew Svetlov2013-04-071-0/+2
| | | | | | | | Patch by Michael Ford.
* | #17504: merge with 3.3.Ezio Melotti2013-03-241-3/+0
|\ \ | |/
| * #17504: remove duplicated sentence. Patch by Radu Voicilas.Ezio Melotti2013-03-241-3/+0
| |
* | Closes issue 17467. Add readline and readlines support to ↵Michael Foord2013-03-201-6/+49
| | | | | | | | unittest.mock.mock_open
* | Merge with 3.3, issue #17047: remove doubled words added in 3.3,Terry Jan Reedy2013-03-111-1/+1
|\ \ | |/ | | | | as reported by Serhiy Storchaka and Matthew Barnett.
| * Issue #17047: remove doubled words added in 3.3Terry Jan Reedy2013-03-111-1/+1
| | | | | | | | as reported by Serhiy Storchaka and Matthew Barnett.
* | Issue #17015: When it has a spec, a Mock object now inspects its signature ↵Antoine Pitrou2013-02-021-65/+109
|/ | | | 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-2/+2
|
* Adding patch.stopall method to unittest.mockMichael Foord2012-06-101-2/+20
|
* Fix exception when calling reset_mock on a mock created with autospecMichael Foord2012-06-091-0/+3
|
* Close #14857: fix regression in references to PEP 3135 implicit __class__ ↵Nick Coghlan2012-05-271-3/+6
| | | | closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
* Remove incorrect commentMichael Foord2012-04-211-1/+0
|
* Closes issue 14634. unittest.mock.create_autospec now supports keyword only ↵Michael Foord2012-04-211-3/+8
| | | | arguments.
* Closes issue 14636. mock objects raise exceptions from an iterable side_effectMichael Foord2012-04-211-3/+7
|
* Minor docstring / docs corrections for unittest.mockMichael Foord2012-04-131-6/+6
|
* Make unittest.mock.create_autospec resilient against AttributeError on ↵Michael Foord2012-04-131-2/+6
| | | | original object
* unittest.mock.PropertyMock return value and attributes are now standard ↵Michael Foord2012-04-131-0/+3
| | | | MagicMocks
* Fix unittest.mock.patch docstringMichael Foord2012-03-281-2/+0
|
* Minor unittest.mock.patch doc / docstring improvementMichael Foord2012-03-281-11/+16
|
* unittest.mock: removed another bit of Python 2 only codeMichael Foord2012-03-251-6/+0
|
* Adding unittest.mock documentationMichael Foord2012-03-251-5/+3
|
* unittest.mock: a mock created by patch with a spec as the list argument will ↵Michael Foord2012-03-251-1/+8
| | | | be callable if __call__ is in the spec
* unittest.mock: remove another piece of Python 2 specific codeMichael Foord2012-03-251-2/+0
|
* Remove more Python 2 code from unittest.mock (obsolete function attributes)Michael Foord2012-03-251-14/+0
|
* Minor changes to the unittest.mock.mock_open helperMichael Foord2012-03-251-5/+4
|
* Addition of docstrings to unittest.mock helpersMichael Foord2012-03-251-2/+20
|
* unittest.mock: set file_spec on first useMichael Foord2012-03-251-2/+6
|
* Support subclassing unittest.mock._patch and fix various obscure bugs around ↵Michael Foord2012-03-251-25/+49
| | | | patcher spec arguments
* unittest.mock.MagicMock objects are now unorderable by defaultMichael Foord2012-03-251-9/+13
|
* Removed XXX from unittest.mock docstring and switch to a nicer ↵Michael Foord2012-03-141-24/+19
| | | | try...except...finally