ANN: mock 0.6.0, Python mocking and testing library

Discussion in 'Python' started by Fuzzyman, Aug 22, 2009.

  1. Fuzzyman

    Fuzzyman Guest

    mock is a Python mock object library for testing, with additional
    support for runtime monkey patching.

    Most mocking libraries follow the ‘record -> replay’ pattern of
    mocking. I prefer the ‘action -> assertion’ pattern, which is more
    readable and intuitive; particularly when working with the Python
    unittest module.

    This release, version 0.6.0, is a minor release but with a few new
    features:

    * mock homepage http://www.voidspace.org.uk/python/mock/
    * download http://www.voidspace.org.uk/downloads/mock-0.6.0.zip
    * PDF documentation http://www.voidspace.org.uk/downloads/mock.pdf
    * Google code project and SVN repository http://code.google.com/p/mock/

    New in 0.6.0:

    * New test layout compatible with test discovery
    * Descriptors (static methods / class methods etc) can now be patched
    and restored correctly
    * Mocks can raise exceptions when called by setting side_effect to an
    exception class or instance
    * Mocks that wrap objects will not pass on calls to the underlying
    object if an explicit return_value is set
     
    Fuzzyman, Aug 22, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gamename

    Unit Testing With Function Mocking

    gamename, Mar 16, 2007, in forum: C Programming
    Replies:
    10
    Views:
    1,073
    gamename
    Mar 19, 2007
  2. Silfheed
    Replies:
    6
    Views:
    336
    Silfheed
    Mar 30, 2007
  3. mo.sparrow
    Replies:
    0
    Views:
    364
    mo.sparrow
    Aug 22, 2008
  4. James Mead
    Replies:
    0
    Views:
    114
    James Mead
    Jul 19, 2006
  5. mo.sparrow
    Replies:
    0
    Views:
    93
    mo.sparrow
    Aug 22, 2008
Loading...

Share This Page