Python Fixtures

Registered 2010-08-15 by Robert Collins

Fixtures defines a Python contract for reusable state / support logic,
primarily for unit testing. Helper and adaption logic is included to make it
easy to write your own fixtures using the fixtures contract. Glue code is
provided that makes using fixtures that meet the Fixtures contract in unittest
compatible test cases easy and straight forward.

Standard Python unittest.py provides no obvious method for making and reusing
state needed in a test case other than by adding a method on the test class.
This scales poorly - complex helper functions propogating up a test class
hierarchy is a regular pattern when this is done. Mocking while a great tool
doesn't itself prevent this (and helpers to mock complex things can accumulate
in the same way if placed on the test class).

By defining a uniform contract where helpers have no dependency on the test
class we permit all the regular code hygiene activities to take place without
the distorting influence of being in a class hierarchy that is modelling an
entirely different thing - which is what helpers on a TestCase suffer from.

Project information

Maintainer:
python-fixtures committers
Driver:
Not yet selected
Development focus:

trunk series 

lp:python-fixtures 
Browse the code

Licences:
Apache Licence, Simplified BSD Licence
()

RDF metadata

View full history Series and milestones

Python Fixtures trunk series is the current focus of development

More contributors Top contributors

All packages Packages in Distributions

Get Involved

Downloads

Latest version is 0.3.12
released on 2012-12-17

All downloads

Announcements

  • 0.1 released on 2010-08-15
    This initial release provides Fixture, FunctionFixture and TestCaseWithFixtur...