Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed patching of objects which define __getattr__.0.10.1 | Gustavo Niemeyer | 2007-12-11 | 3 | -5/+81 |
| | |||||
* | Preparing to release 0.10.0.10 | Gustavo Niemeyer | 2007-12-09 | 2 | -2/+2 |
| | |||||
* | Orderer() is now implemented based on may_run() instead of matches(). | Gustavo Niemeyer | 2007-12-09 | 3 | -31/+70 |
| | | | | | If the event is run with may_run() False, a nice assertion error is raised with a nice debugging message. :-) | ||||
* | Introduced {Task,Event}.may_run() to improve replaying ordering | Gustavo Niemeyer | 2007-12-09 | 2 | -21/+115 |
| | | | | | logic. Now events which have may_run() true will be run before events which don't. | ||||
* | When the expression executed isn't exactly the same as the | Gustavo Niemeyer | 2007-12-09 | 3 | -7/+43 |
| | | | | | recorded events (e.g. when parameter matchers are used), show in the error message the real expression run, to aid in debugging. | ||||
* | Fixed problem when requesting order on similar expressions. The | Gustavo Niemeyer | 2007-12-09 | 3 | -13/+34 |
| | | | | second expression might not be accepted. | ||||
* | MockerTestCase.makeFile() with content=None (the default) now | Gustavo Niemeyer | 2007-12-07 | 3 | -8/+17 |
| | | | | | consistently returns an unexistent temporary filename which is properly cleaned up if created. | ||||
* | New 'path' option to MockerTestCase.makeFile() and makeDir(), | Gustavo Niemeyer | 2007-12-05 | 3 | -15/+47 |
| | | | | which allows setting the full target path with a single option. | ||||
* | New MATCH() argument matcher, which allows using a function | Gustavo Niemeyer | 2007-12-05 | 3 | -3/+28 |
| | | | | to match an argument generically. E.g. MATCH(lambda x: x > 10) | ||||
* | Implemented MockerTestCase.addCleanup(). It allows one to | Gustavo Niemeyer | 2007-12-05 | 3 | -21/+47 |
| | | | | | register cleanup functions to be called after the test is complete. | ||||
* | Now when a spec is provided (or with proxy/replace/patch) the | Gustavo Niemeyer | 2007-12-04 | 3 | -0/+26 |
| | | | | | existence of the real method is checked even if the mocked method doesn't have to execute (e.g. due to count(0)). | ||||
* | MockerTestCase now verifies if the mocker is put in replay | Gustavo Niemeyer | 2007-12-04 | 3 | -1/+30 |
| | | | | mode in cases where events were recorded. | ||||
* | Implemented support for Deferred results as understood by | Gustavo Niemeyer | 2007-12-04 | 3 | -6/+65 |
| | | | | | Twisted Trial's TestCase, so that coexistence by multiple inheritance is possible and trivial. | ||||
* | In MockerTestCase's constructor, copy attributes from the original method | Gustavo Niemeyer | 2007-12-04 | 2 | -1/+15 |
| | | | | into the wrapper. | ||||
* | Break the import of sets for Python 2.3 and add pragma: nocover | Gustavo Niemeyer | 2007-11-24 | 1 | -2/+2 |
| | | | | to prevent it being seen as an uncovered statement in Python 2.4+. | ||||
* | Preparing to release 0.9.3.0.9.3 | Gustavo Niemeyer | 2007-11-24 | 2 | -2/+2 |
| | |||||
* | - Added support for Python 2.3 (patch by Phillip J. Eby). | Gustavo Niemeyer | 2007-11-24 | 3 | -63/+101 |
| | | | | | - Added MockerTestCase.assert{True,False} aliases, so that they're available even in Python 2.3. | ||||
* | Introduced automatic test coverage verification, and covered the | Gustavo Niemeyer | 2007-11-23 | 3 | -12/+93 |
| | | | | few statements which were not being passed through. | ||||
* | Updated version to 0.9.2.0.9.2 | Gustavo Niemeyer | 2007-11-22 | 1 | -1/+1 |
| | |||||
* | Now Mocker.mock()/proxy()/replace() accept a 'count' keyword | Gustavo Niemeyer | 2007-11-22 | 3 | -10/+51 |
| | | | | | parameter, which if set to False, the default behavior of allowing expressions just once is disabled. | ||||
* | In recording mode, mock.__class__ will now return Mock, and not | Gustavo Niemeyer | 2007-11-22 | 3 | -7/+33 |
| | | | | | | record the action. This allows Mocker to be used in interactive environments which inspect the result's type, such as in iPython (reported by Alex Dante). | ||||
* | Typo fix in NEWS. | Gustavo Niemeyer | 2007-11-19 | 1 | -1/+1 |
| | |||||
* | Fixed setup.py to install mocker.py properly.0.9.1 | Gustavo Niemeyer | 2007-11-18 | 3 | -1/+8 |
| | |||||
* | "unexistent" doesn't exist. | Gustavo Niemeyer | 2007-11-17 | 1 | -1/+1 |
| | |||||
* | Preparing to release version 0.9.0.9 | Gustavo Niemeyer | 2007-11-17 | 2 | -2/+2 |
| | |||||
* | Added MockerTestCase.assert[Not]{Starts,Ends}With(). | Gustavo Niemeyer | 2007-11-17 | 3 | -0/+150 |
| | |||||
* | Added MockerTestCase.assertMethodsMatch(). It will verify if all | Gustavo Niemeyer | 2007-11-17 | 3 | -0/+102 |
| | | | | | | | 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 Niemeyer | 2007-11-13 | 3 | -2/+48 |
| | |||||
* | When using an unexistent import path for Mocker.proxy(), raise an | Gustavo Niemeyer | 2007-11-13 | 3 | -2/+16 |
| | | | | | 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 Niemeyer | 2007-11-12 | 3 | -19/+5 |
| | | | | | 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 offer | Gustavo Niemeyer | 2007-11-12 | 3 | -1/+156 |
| | | | | | easy creation of temporary files/directories with certainty of removal after tests finish running. | ||||
* | Adding release infrastructure.0.8 | Gustavo Niemeyer | 2007-11-11 | 5 | -0/+304 |
| | |||||
* | Added some meta-information to the mocker module. | Gustavo Niemeyer | 2007-11-11 | 1 | -0/+10 |
| | |||||
* | Minor change in Mocker's docstring. | Gustavo Niemeyer | 2007-11-11 | 1 | -6/+6 |
| | |||||
* | Moved "string proxying" logic out of replace() and into proxy(). | Gustavo Niemeyer | 2007-11-11 | 2 | -16/+32 |
| | |||||
* | Fixed SpecChecker to not break with callables not supported by | Gustavo Niemeyer | 2007-11-11 | 2 | -6/+37 |
| | | | | getargspec (e.g. builtin functions). | ||||
* | Implemented delitem action kind. | Gustavo Niemeyer | 2007-11-11 | 2 | -0/+30 |
| | |||||
* | - Implemented MockerTestCase. | Gustavo Niemeyer | 2007-11-11 | 2 | -53/+484 |
| | | | | | - Renamed special argument SAME to IS, and added IN. - Implemented Mocker.on_restore(). | ||||
* | Implemented Mocker.generate(). | Gustavo Niemeyer | 2007-11-04 | 2 | -0/+16 |
| | |||||
* | Implemented len, iter and nonzero action kinds. | Gustavo Niemeyer | 2007-11-04 | 2 | -8/+153 |
| | |||||
* | Implemented support for "getitem" and "setitem" action kinds. | Gustavo Niemeyer | 2007-10-31 | 2 | -1/+53 |
| | |||||
* | Added support for "delattr" and "contains" kinds, and finished | Gustavo Niemeyer | 2007-10-31 | 2 | -9/+114 |
| | | | | support for "setattr". | ||||
* | - Now if replay() is run while already in replay mode, the mocker | Gustavo Niemeyer | 2007-10-30 | 2 | -127/+292 |
| | | | | | | | | | | | | | 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 Niemeyer | 2007-10-30 | 2 | -151/+151 |
| | |||||
* | Minor changes in documentation. | Gustavo Niemeyer | 2007-10-30 | 1 | -10/+7 |
| | |||||
* | Moved it forward, most importantly implementing the patching feature. | Gustavo Niemeyer | 2007-10-29 | 2 | -474/+1744 |
| | |||||
* | Adding initial version of python-mocker to repository! It's alive! | Gustavo Niemeyer | 2007-10-14 | 2 | -0/+2736 |