gustavo at niemeyer.net
Mon Nov 12 15:45:09 CET 2007
Mocker 0.8 is now public.
- Graceful platform for test doubles in Python (mocks, stubs,
fakes, and dummies).
- Inspiration from real needs, and also from pmock, jmock,
pymock, easymock, etc.
- Expectation of expressions defined by actually using mock objects.
- Expressions may be replayed in any order by default,
- Trivial specification of ordering between expressions when wanted.
- Nice parameter matching for defining expectations on method calls.
- Good error messages when expectations are broken.
- Mocking of many kinds of expressions (getting/setting/deleting
attributes, calling, iteration, containment, etc)
- Graceful handling of nested expressions (e.g.
- Mock "proxies", which allow passing through to the real object on
specified expressions (e.g. useful with "os.path.isfile()").
- Mocking via temporary "patching" of existent classes and instances.
- Trivial mocking of any external module (e.g. "time.time()") via
- Mock objects may have method calls checked for conformance with
real class/instance to prevent API divergence.
- Type simulation for using mocks while still performing certain
- Nice (optional) integration with "unittest.TestCase", including
additional assertions (e.g. "assertIs", "assertIn", etc).
- More ...
More information about the Python-announce-list