testfixtures 3.0.0 Released!

Discussion in 'Python' started by Chris Withers, Mar 5, 2013.

  1. Hi All,

    I'm pleased to announce the release of testfixtures 3.0.0. The big
    change for this release is that testfixtures now supports Python 2.6,
    2.7, 3.2 and 3.3!

    As a result, some changes have been made to TempDirectory to support
    encoding and decoding. There's also a nice little addition of an
    optional prefix to the message generated when comparisons fail:

    >>> from testfixtures import compare
    >>> compare(1, 2, prefix='wrong number of orders')

    Traceback (most recent call last):
    ...
    AssertionError: wrong number of orders: 1 != 2

    The means that you still get the rich comparison feedback offered by
    compare, but can also add more information to make any failure more
    easily understandable without having to dig into the source.

    Other than that, there have been a couple of minor bug fixes.

    If you haven't bumped into it already, testfixtures is a collection of
    helpers for writing succinct unit tests including help for:

    - Comparing objects and sequences

    Better feedback when the results aren't as you expected along with
    support for comparison of objects that don't normally support comparison.

    - Mocking out objects and methods

    Easy to use ways of stubbing out objects, classes or individual methods
    for both doc tests and unit tests. Special helpers are provided for
    testing with dates and times.

    - Testing logging

    Helpers for capturing logging output in both doc tests and unit tests.

    - Testing stream output

    Helpers for capturing stream output, such as that from print statements,
    and making assertion about it.

    - Testing with files and directories

    Support for creating and checking files and directories in sandboxes for
    both doc tests and unit tests.

    - Testing exceptions

    Easy to use ways of checking that a certain exception is raised, even
    down the to the parameters the exception is raised with.

    The package is on PyPI and a full list of all the links to docs, issue
    trackers and the like can be found here:

    http://www.simplistix.co.uk/software/python/testfixtures

    Any questions, please do ask on the Testing in Python list or on the
    Simplistix open source mailing list...

    cheers,

    Chris

    --
    Simplistix - Content Management, Batch Processing & Python Consulting
    - http://www.simplistix.co.uk
    Chris Withers, Mar 5, 2013
    #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. Chris Withers

    TestFixtures 1.6.0 released!

    Chris Withers, Jun 18, 2009, in forum: Python
    Replies:
    0
    Views:
    247
    Chris Withers
    Jun 18, 2009
  2. Chris Withers

    TestFixtures 1.6.1 released!

    Chris Withers, Sep 6, 2009, in forum: Python
    Replies:
    0
    Views:
    234
    Chris Withers
    Sep 6, 2009
  3. Chris Withers

    TestFixtures 1.6.2 released!

    Chris Withers, Sep 23, 2009, in forum: Python
    Replies:
    0
    Views:
    218
    Chris Withers
    Sep 23, 2009
  4. Chris Withers

    TestFixtures 1.8.0 Released!

    Chris Withers, Jan 14, 2011, in forum: Python
    Replies:
    0
    Views:
    172
    Chris Withers
    Jan 14, 2011
  5. Chris Withers

    TestFixtures 1.9.0 Released!

    Chris Withers, Feb 11, 2011, in forum: Python
    Replies:
    0
    Views:
    233
    Chris Withers
    Feb 11, 2011
Loading...

Share This Page