You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chris Withers 97622bfe41 Prepare for 7.0.0 release. 1 month ago
.circleci Minimum supported version is now Python 3.6 1 month ago
docs Add type annotations. 1 month ago
testfixtures Prepare for 7.0.0 release. 1 month ago
.carthorse.yml Fix for newer CircleCI images 6 months ago
.coveragerc Add type annotations. 1 month ago
.gitignore ignore build dir 3 years ago
.readthedocs.yml have doc builds blow up on warnings 3 years ago
CHANGELOG.rst Prepare for 7.0.0 release. 1 month ago
LICENSE.txt Update README 1 month ago
README.rst Refresh documentation. 1 month ago
conftest.py Support for TempDirectory to wrap existing directories. 1 month ago
pytest.ini Minimum supported version is now Python 3.6 1 month ago
setup.py Add type annotations. 1 month ago

README.rst

Testfixtures

CircleCI_ Docs_

Testfixtures is a collection of helpers and mock objects that are useful when writing automated tests in Python.

The areas of testing this package can help with are listed below:

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 and comparison of deeply nested datastructures.

Mocking out objects and methods

Easy to use ways of stubbing out objects, classes or individual methods. Specialised helpers and mock objects are provided, including sub-processes, dates and times.

Testing logging

Helpers for capturing logging and checking what has been logged is what was expected.

Testing stream output

Helpers for capturing stream output, such as that from print function calls or even stuff written directly to file descriptors, and making assertions about it.

Testing with files and directories

Support for creating and checking both files and directories in sandboxes including support for other common path libraries.

Testing exceptions and warnings

Easy to use ways of checking that a certain exception is raised, or a warning is issued, even down the to the parameters provided.

Testing when using django

Helpers for comparing instances of django models.

Testing when using Twisted

Helpers for making assertions about logging when using Twisted.

Testing when using zope.component

An easy to use sterile component registry.