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.
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
File details
Details for the file testfixtures-8.3.0.tar.gz
.
File metadata
- Download URL: testfixtures-8.3.0.tar.gz
- Upload date:
- Size: 137.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c0b84af2f267610f908009b50d6f983a4e58ade22c67bab6787b5a402d59c0 |
|
MD5 | 2fb494de4ba08d85e7b68f90cb296698 |
|
BLAKE2b-256 | 3b25d7e9d05f87e2ab84657a0dfb1f24fc295d542ac2eb221531d976ea4aa1ff |
File details
Details for the file testfixtures-8.3.0-py3-none-any.whl
.
File metadata
- Download URL: testfixtures-8.3.0-py3-none-any.whl
- Upload date:
- Size: 105.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d1e0e0005c4d6ac2a2ab27916704c6471047f0d2f78f2e54adf20abdacc7b10 |
|
MD5 | 96b2fb7886f99c0b7b5f0a7463017366 |
|
BLAKE2b-256 | 1a4e699671ba484b94bda0959b281ff59b24f728263befd13e060fa038ce3bc8 |