- Changed license to BSD, since the PSF license only applies to Python
itself (#583335).
- Unwrap bound methods on replace() and proxy(), as suggested
by James Henstridge (#270782).
- MockerTestCase.assertRaises() will now return the exception raised,
allowing further inspection of the raised exception (implemented by
Thomas Hervé) (#299930).
- Fixed support for Python 2.6. Mocking of iterators was broken in
certain cases because, even though that's *not* documented, Python
tries to use __length_hint__ in some cases.
- Fixed support for MockerTestCase.addCleanup() in Python 2.3,
by Anders F Björklund (#528657).
- Implemented Expect helper, which allows creating a new expect()
"function" with an explicitly provided Mocker instance. This
helps in cases where the expression can't result in a Mock
instance (e.g. expect(iter(mock))) (#196388, #179072).
- __nonzero__ should necessarily return a boolean value, so transform Mock
results into True (#380024).
- Applied change suggested by David Glick to avoid reimporting modules
(#529675).
- When setting the temporary __mocker_mock__ attribute, use Mocker.patch()
so that by the end of the mocking it's properly removed (by Thomas Herve).
- Prevent the MockerTestCase base from leaving the mocker in replay mode
while the base class run() method runs, since this might have additional
logic which touches mocked content (time.time() was one case). Thanks
to Thomas Herve for the initial debugging.
- Ensure that the raised AttributeError exception on a patched object
exposes the real problem rather than a mocker error (by Duncan McGreggor).
- When cleaning up on MockerTestCase, use reset() rather than restore(),
so that the same test case instance may be run more than once (like
Trial does).
- Some tweaks to prepare for Python 3.
- Added MockerTestCase to __all__.