testfixtures 9.2.0


pip install testfixtures

  Latest version

Released: Oct 13, 2025

Project Links

Meta
Author: Chris Withers
Requires Python: >=3.11

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Programming Language
  • Python :: 3

Docs PyPI Git CircleCI

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.

9.2.0 Oct 13, 2025
9.1.0 Jul 08, 2025
9.0.1 Jul 04, 2025
9.0.0 Jul 03, 2025
8.3.0 Jun 07, 2024
8.2.0 May 01, 2024
8.1.0 Mar 01, 2024
8.0.0 Feb 16, 2024
7.2.2 Oct 20, 2023
7.2.1 Oct 20, 2023
7.2.0 Sep 15, 2023
7.1.0 Feb 08, 2023
7.0.4 Dec 05, 2022
7.0.3 Nov 03, 2022
7.0.2 Nov 01, 2022
7.0.1 Nov 01, 2022
7.0.0 Jul 06, 2022
6.18.5 Mar 01, 2022
6.18.4 Feb 25, 2022
6.18.3 Sep 29, 2021
6.18.2 Sep 21, 2021
6.18.1 Aug 20, 2021
6.18.0 Jul 15, 2021
6.17.1 Jan 14, 2021
6.17.0 Dec 16, 2020
6.16.0 Dec 09, 2020
6.15.0 Oct 09, 2020
6.14.2 Sep 04, 2020
6.14.1 Apr 20, 2020
6.14.0 Feb 24, 2020
6.13.1 Feb 20, 2020
6.13.0 Feb 18, 2020
6.12.1 Feb 16, 2020
6.12.0 Feb 06, 2020
6.11.0 Jan 29, 2020
6.10.3 Nov 22, 2019
6.10.2 Nov 16, 2019
6.10.1 Nov 01, 2019
6.10.0 Jun 19, 2019
6.9.0 Jun 10, 2019
6.8.2 May 04, 2019
6.8.1 May 02, 2019
6.8.0 May 02, 2019
6.7.1 Apr 29, 2019
6.7.0 Apr 11, 2019
6.6.2 Mar 22, 2019
6.6.1 Mar 13, 2019
6.6.0 Feb 22, 2019
6.5.2 Feb 18, 2019
6.5.1 Feb 18, 2019
6.5.0 Jan 28, 2019
6.4.3 Jan 10, 2019
6.4.2 Jan 09, 2019
6.4.1 Dec 24, 2018
6.4.0 Dec 19, 2018
6.3.0 Sep 04, 2018
6.2.0 Jun 14, 2018
6.1.0 Jun 06, 2018
6.0.2 May 02, 2018
6.0.1 Apr 17, 2018
6.0.0 Mar 27, 2018
5.4.0 Jan 25, 2018
5.3.1 Nov 21, 2017
5.3.0 Oct 28, 2017
5.2.0 Sep 03, 2017
5.1.1 Jun 08, 2017
5.1.0 Jun 08, 2017
5.0.0 Jun 05, 2017
4.14.3 May 15, 2017
4.14.2 May 15, 2017
4.14.1 May 15, 2017
4.14.0 May 15, 2017
4.13.5 Mar 01, 2017
4.13.4 Feb 06, 2017
4.13.3 Dec 13, 2016
4.13.1 Nov 02, 2016
4.13.0 Nov 02, 2016
4.12.0 Oct 18, 2016
4.11.0 Oct 12, 2016
4.10.1 Sep 05, 2016
4.10.0 May 17, 2016
4.9.1 Feb 23, 2016
4.9.0 Feb 18, 2016
4.8.0 Feb 02, 2016
4.7.0 Dec 10, 2015
4.6.0 Dec 03, 2015
4.5.1 Nov 23, 2015
4.5.0 Nov 13, 2015
4.4.0 Nov 02, 2015
4.3.3 Sep 15, 2015
4.3.2 Sep 15, 2015
4.3.0 Sep 15, 2015
4.2.0 Aug 11, 2015
4.1.2 Jan 30, 2015
4.1.1 Oct 30, 2014
4.1.0 Oct 14, 2014
4.0.2 Sep 10, 2014
4.0.1 Aug 04, 2014
4.0.0 Jul 22, 2014
3.0.2 Apr 07, 2014
3.0.1 Jun 10, 2013
3.0.0 Mar 05, 2013
2.3.5 Aug 13, 2012
2.3.4 Jan 31, 2012
2.3.3 Dec 12, 2011
2.3.2 Nov 10, 2011
2.3.1 Nov 08, 2011
2.3.0 Oct 11, 2011
2.2.0 Oct 04, 2011
2.1.0 Sep 29, 2011
2.0.1 Sep 23, 2011
2.0.0 Sep 23, 2011
1.12.0 Aug 16, 2011
1.11.3 Aug 03, 2011
1.11.2 Jul 28, 2011
1.11.1 Jul 28, 2011
1.11.0 Jul 27, 2011
1.10.0 Jul 19, 2011
1.9.2 Apr 20, 2011
1.9.1 Mar 11, 2011
1.9.0 Feb 11, 2011
1.8.0 Jan 14, 2011
1.8.0.dev0 Sep 07, 2010
1.7.0 Jan 21, 2010
1.6.3 Jan 20, 2010
1.6.2 Sep 23, 2009
1.6.1 Sep 07, 2009
1.6.0 May 10, 2009
1.5.4 Feb 11, 2009
1.5.3 Dec 17, 2008
1.5.2 Dec 14, 2008
1.5.1 Dec 12, 2008
1.5.0 Dec 12, 2008
1.4.0 Dec 12, 2008
1.3.1 Dec 10, 2008
1.3.0 Dec 09, 2008
1.2.0 Dec 03, 2008
1.1.0 Dec 03, 2008
1.0.0 Nov 26, 2008
1.8.0dev-r4464

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies: