Archives June 2010
Mocker's hidden gem...
Written by
on
in
Snaking.
Mocker has one uber-nice feature... it will mock out an object in basically all namespaces, so you can do a .proxy( 'mymodule.this.that' ) and have the resulting mock object replace the target "that" wherever it's been imported. It won't, for instance, pick up references in lists, sets and the like, but for basic namespaces (dictionaries) ...
Stub/Mock-a-Process Module
Written by
on
in
Snaking.
Say you want to have a test suite that tests logic which runs command-line processes that should *not* be run on the test machine (e.g. they would cause the test machine's configuration to be totally messed up). You want to test right down to the point where the call is made (i.e. you don't way ...