Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ANN: mock 0.6.0, Python mocking and testing library

Reply
Thread Tools

ANN: mock 0.6.0, Python mocking and testing library

 
 
Fuzzyman
Guest
Posts: n/a
 
      08-22-2009
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mocking Objects with Typemock Isolator Mocking framework for .NetUnit Testing mo.sparrow ASP .Net 0 08-22-2008 11:55 AM
Typemock - Mocking framework for unit testing - News - Free opensource license mo.sparrow Ruby 0 08-22-2008 11:35 AM
Python automatic testing: mocking an imported module? Silfheed Python 6 03-30-2007 12:55 AM
Unit Testing With Function Mocking gamename C Programming 10 03-19-2007 06:17 PM
[ANN] Mocha - new stubbing and mocking library released James Mead Ruby 0 07-19-2006 01:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57