A collection of helpers and mock objects for unit tests and doc tests.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for testfixtures-7.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a857169443478986dd74b1d6141bd34a9b04e395a7d4ee54fb0b81c353861765 |
|
MD5 | 45e86d8a0c5df1dc51529fa25118248c |
|
BLAKE2b-256 | 2d854fca349bbd4820aa6e65031bad72e7a67a7bec5c9ec995c480cc69e580cb |