Download project files

How do I verify a download?


1.1 release from the trunk series released 2010-09-18

Release information
Release notes:

- mocker.call() now supports a with_object argument. If True, the called
  function will receive the patched or proxied object so that its state
  may be used or verified in checks.

- assertRaises() in MockerTestCase can now be used like Python 2.7 and 3.2,
  as a context manager. This enables contructs such as:

      with self.assertRaises(Error):
          raising_logic()

- Added assertRaisesRegexp() to MockerTestCase. It works similarly to
  the version in Python 2.7 and 3.2, except it will also return the error
  found. It also works as a context manager for with: statements.

- Added assertIsInstance() and assertNotIsInstance().

- Fixed bug #634566, reported by Mark Hammond, where throw(Error) effects
  might make the recorded action be accepted multiple times.

Changelog:

- mocker.call() now supports a with_object argument. If True, the called
  function will receive the patched or proxied object so that its state
  may be used or verified in checks.

- assertRaises() in MockerTestCase can now be used like Python 2.7 and 3.2,
  as a context manager. This enables contructs such as:

      with self.assertRaises(Error):
          raising_logic()

- Added assertRaisesRegexp() to MockerTestCase. It works similarly to
  the version in Python 2.7 and 3.2, except it will also return the error
  found. It also works as a context manager for with: statements.

- Added assertIsInstance() and assertNotIsInstance().

- Fixed bug #634566, reported by Mark Hammond, where throw(Error) effects
  might make the recorded action be accepted multiple times.

File Description Downloads
download icon mocker-1.1.tar.bz2 (md5, sig) Source code 11,754
last downloaded 24 hours ago
Total downloads: 11,754

1.0 release from the trunk series released 2010-06-21

Release information
Changelog:

- 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__.

File Description Downloads
download icon mocker-1.0.tar.bz2 (md5) Source 3,187
last downloaded 2 days ago
Total downloads: 3,187

0.10.1 release from the trunk series released 2007-12-11

Release information
Release notes:

- Fixed patching of objects which define __getattr__.

Changelog:

- Fixed patching of objects which define __getattr__.

File Description Downloads
download icon mocker-0.10.1.tar.bz2 (md5) Source code 8,868
last downloaded 3 days ago
Total downloads: 8,868

0.10 release from the trunk series released 2007-12-09

Release information
Release notes:

- Greatly improved error messages and logic for expression ordering!

- Implemented MockerTestCase.addCleanup(). It allows one to
  register cleanup functions to be called after the test is
  complete.

- MockerTestCase now verifies if the mocker is put in replay
  mode in cases where events were recorded.

- New MATCH() argument matcher, which allows using a function
  to match an argument generically. E.g. MATCH(lambda x: x > 10)

- New 'path' option to MockerTestCase.makeFile() and makeDir(),
  which allows setting the full target path with a single option.

- Now when a spec is provided (or with proxy/replace/patch) the
  existence of the real method is checked even if the mocked
  method doesn't execute. This is useful to detect API expectation
  errors even if count(0) is used ...

Changelog:

- Greatly improved error messages and logic for expression ordering!

- Implemented MockerTestCase.addCleanup(). It allows one to
  register cleanup functions to be called after the test is
  complete.

- MockerTestCase now verifies if the mocker is put in replay
  mode in cases where events were recorded.

- New MATCH() argument matcher, which allows using a function
  to match an argument generically. E.g. MATCH(lambda x: x > 10)

- New 'path' option to MockerTestCase.makeFile() and makeDir(),
  which allows setting the full target path with a single option.

- Now when a spec is provided (or with proxy/replace/patch) the
  existence of the real method is checked even if the mocked
  method doesn't execute. This is useful to detect API expectation
  errors even if count(0) is used (a negative assertion).

- Implemented in MockerTestCase support for Deferred results as
  understood by Twisted Trial's TestCase, so that coexistence by
  multiple inheritance is possible and trivial.

- MockerTestCase.makeFile() with content=None (the default) now
  consistently returns an unexistent temporary filename which
  is properly cleaned up if created.

- Fixed problem when requesting order on similar expressions. The
  second expression might not be accepted.

- When the expression executed isn't exactly the same as the
  recorded events (e.g. when parameter matchers are used), show in
  the error message the real expression run, to aid in debugging.

File Description Downloads
download icon mocker-0.10.tar.bz2 (md5) Source code 861
last downloaded 49 weeks ago
Total downloads: 861

0.9.3 release from the trunk series released 2007-11-24

Release information
Release notes:

- Added support for Python 2.3 (patch by Phillip J. Eby).

- Added MockerTestCase.assert{True,False} aliases, so that they're
  available even in Python 2.3.

- Introduced automatic test coverage verification as part of
  the test suite, based on the 'coverage' module by Ned Batchelder,
  to ensure that it continues to have 100% of statement coverage.

Changelog:

- Added support for Python 2.3 (patch by Phillip J. Eby).

- Added MockerTestCase.assert{True,False} aliases, so that they're
  available even in Python 2.3.

- Introduced automatic test coverage verification as part of
  the test suite, based on the 'coverage' module by Ned Batchelder,
  to ensure that it continues to have 100% of statement coverage.

File Description Downloads
download icon mocker-0.9.3.tar.bz2 (md5) Source code 862
last downloaded 49 weeks ago
Total downloads: 862

0.9.2 release from the trunk series released 2007-11-22

Release information
Release notes:

- In recording mode, mock.__class__ will now return Mock, and not
  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).

- Now Mocker.mock()/proxy()/replace() accept a 'count' keyword
  parameter, which if set to False, the default behavior of allowing
  expressions just once is disabled.

Changelog:

- In recording mode, mock.__class__ will now return Mock, and not
  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).

- Now Mocker.mock()/proxy()/replace() accept a 'count' keyword
  parameter, which if set to False, the default behavior of allowing
  expressions just once is disabled.

File Description Downloads
download icon mocker-0.9.2.tar.bz2 (md5) Source code 857
last downloaded 17 weeks ago
Total downloads: 857

0.9.1 release from the trunk series released 2007-11-18

Release information
Release notes:

Fixed setup.py to install mocker.py properly.

Changelog:

- Fixed setup.py to install mocker.py properly.

File Description Downloads
download icon mocker-0.9.1.tar.bz2 (md5) Source code 853
last downloaded 49 weeks ago
Total downloads: 853

0.9 release from the trunk series released 2007-11-17

Release information
Release notes:

- Added MockerTestCase.makeFile() and .makeDir() helpers. They offer
  easy creation of temporary files/directories, and ensure that they
  get removed after each test method runs.

- Added MockerTestCase.assertMethodsMatch(). It will verify if all
  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 has the same API as the real class being simulated.

- Added MockerTestCase.assert[Not]{Starts,Ends}With().

- If the replay() method is called twice, expectations will be fully
  reset so that several similar tests may be performed in a row by
  just calling replay() again.

- Mocker.on_restore() removed. Restore isn't ...

Changelog:

- Added MockerTestCase.makeFile() and .makeDir() helpers. They offer
  easy creation of temporary files/directories, and ensure that they
  get removed after each test method runs.

- Added MockerTestCase.assertMethodsMatch(). It will verify if all
  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 has the same API as the real class being simulated.

- Added MockerTestCase.assert[Not]{Starts,Ends}With().

- If the replay() method is called twice, expectations will be fully
  reset so that several similar tests may be performed in a row by
  just calling replay() again.

- Mocker.on_restore() removed. Restore isn't performed if replay()
  isn't called, and that may not be obvious, so a hook won't be
  exposed for now.

- When using a non-existent import path for Mocker.proxy(), raise an
  ImportError on the base module, rather than using the actual
  string as the object (#162315).

File Description Downloads
download icon mocker-0.9.tar.bz2 (md5) Source code 858
last downloaded 49 weeks ago
Total downloads: 858

0.8 release from the trunk series released 2007-11-12

Release information
Release notes:

Mocker released!

File Description Downloads
download icon mocker-0.8.tar.bz2 (md5) Source code 865
last downloaded 17 weeks ago
Total downloads: 865