summaryrefslogtreecommitdiff
path: root/mocker.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added MockerTestCase.assertMethodsMatch(). It will verify if allGustavo Niemeyer2007-11-171-0/+34
| | | | | | | public methods found in the class passed as the first argument are also present in the class passed as the second argument, and that they accept the same arguments. This is useful to verify if a fake or stub class have the same API as the real class being simulated.
* Implemented state resetting on replay() for RunCounter and Orderer.Gustavo Niemeyer2007-11-131-0/+6
|
* When using an unexistent import path for Mocker.proxy(), raise anGustavo Niemeyer2007-11-131-2/+9
| | | | | ImportError on the base module, rather than using the actual string as the object (#162315).
* Mocker.on_restore() removed. Restore isn't performed if replay()Gustavo Niemeyer2007-11-121-8/+0
| | | | | isn't called, and that may not be obvious, so a hook won't be exposed for now.
* New MockerTestCase.makeFile() and .makeDir() helpers. They offerGustavo Niemeyer2007-11-121-0/+53
| | | | | easy creation of temporary files/directories with certainty of removal after tests finish running.
* Added some meta-information to the mocker module.Gustavo Niemeyer2007-11-111-0/+10
|
* Minor change in Mocker's docstring.Gustavo Niemeyer2007-11-111-6/+6
|
* Moved "string proxying" logic out of replace() and into proxy().Gustavo Niemeyer2007-11-111-16/+16
|
* Fixed SpecChecker to not break with callables not supported byGustavo Niemeyer2007-11-111-6/+14
| | | | getargspec (e.g. builtin functions).
* Implemented delitem action kind.Gustavo Niemeyer2007-11-111-0/+12
|
* - Implemented MockerTestCase.Gustavo Niemeyer2007-11-111-21/+146
| | | | | - Renamed special argument SAME to IS, and added IN. - Implemented Mocker.on_restore().
* Implemented Mocker.generate().Gustavo Niemeyer2007-11-041-0/+6
|
* Implemented len, iter and nonzero action kinds.Gustavo Niemeyer2007-11-041-1/+41
|
* Implemented support for "getitem" and "setitem" action kinds.Gustavo Niemeyer2007-10-311-0/+15
|
* Added support for "delattr" and "contains" kinds, and finishedGustavo Niemeyer2007-10-311-6/+26
| | | | support for "setattr".
* - Now if replay() is run while already in replay mode, the mockerGustavo Niemeyer2007-10-301-73/+157
| | | | | | | | | | | | | is restored and then put back in replay mode - Implemented Mocker.reset(). - Now patch() sets the spec to the given object by default, and the new spec argument acts like usual. - Got rid of ordered(), and integrated its functionality in order() itself, when called without arguments. unordered() was renamed to unorder() for symmetry. - passthrough() now takes a result_callback argument, called with the result of the real function as the only argument. - Added setattr events in the mock.
* Replaced set_state() by replay()/restore().Gustavo Niemeyer2007-10-301-72/+66
|
* Minor changes in documentation.Gustavo Niemeyer2007-10-301-10/+7
|
* Moved it forward, most importantly implementing the patching feature.Gustavo Niemeyer2007-10-291-146/+739
|
* Adding initial version of python-mocker to repository! It's alive!Gustavo Niemeyer2007-10-141-0/+895