NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2763 most downloaded on PyPI
A collection of helpers and mock objects for unit tests and doc tests.
Last release 2 days ago
02 Oct 2026
Ships unpredictably
gaps range from 9 days to 13 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
18 years old
148 releases · first in 2008
compare now uses a registry of comparers that can be modified either by passing a registry option to compare or, globally, using the ~comparison.regis
compare now uses a registry of comparers that can be modified either by passing a registry option to compare or, globally, using the ~comparison.register function.
added a comparer for set instances to compare.
added a new show_whitespace parameter to ~comparers.compare_text, the comparer used when comparing strings and unicodes with compare.
The internal queue for test_datetime is now considered to be in local time. This has implication on the values returned from both ~testfixtures.datetime.MockDateTime.now and ~testfixtures.datetime.MockDateTime.utcnow when tzinfo is passed to the test_datetime constructor.
~testfixtures.datetime.MockDate.set and ~testfixtures.datetime.MockDate.add on test_date, test_datetime and test_time now accept instances of the appropriate type as an alternative to just passing in the parameters to create the instance.
Refactored the monolithic __init__.py into modules for each type of functionality.
Add a ~OutputCapture.captured property to OutputCapture so that more complex assertion can be made about the output that has been captured.
One column per quarter.
Add a ~OutputCapture.captured property to OutputCapture so that more complex assertion can be made about the output that has been captured.
OutputCapture context managers can now be temporarily disabled using their ~OutputCapture.disable method.
Logging can now be captured only when it exceeds a specified logging level.
The handling of timezones has been reworked in both test_datetime and test_time. This is not backwards compatible but is much more useful and correct.
Fix bugs where various test_date , test_datetime and test_time methods didn't accept keyword parameters.
Fix bugs where various test_date, test_datetime and test_time methods didn't accept keyword parameters.
Fix for 1.10 and 1.11 releases that didn't include non-.py files as a result of the move from subversion to git.
Fix for 1.10 and 1.11 releases that didn't include non-.py files as a result of the move from subversion to git.
Fix bug where testfixtures.datetime.MockDateTime.now didn't accept the tz parameter that datetime.datetime.now did.
Fix bug where testfixtures.datetime.MockDateTime.now didn't accept the tz parameter that datetime.datetime.now did.
Give more useful output when comparing dicts and their subclasses.
Give more useful output when comparing dicts and their subclasses.
Turn should_raise into a decorator form of ShouldRaise rather than the rather out-moded wrapper function that it was.
Remove dependency on zope.dottedname.
Remove dependency on zope.dottedname.
Implement the ability to mock out dict and list items using ~testfixtures.Replacer and ~testfixtures.replace.
Implement the ability to remove attributes and dict items using ~testfixtures.Replacer and ~testfixtures.replace.
Remove dependency on zope.dottedname .
Implement the ability to mock out dict and list items using Replacer and replace() .
Implement the ability to remove attributes and dict items using Replacer and replace() .
Fix for issue #328: ~testfixtures.datetime.MockDateTime.utcnow of test_datetime now returns items from the internal queue in the same way as ~testfixt
Fix for issue #328: ~testfixtures.datetime.MockDateTime.utcnow of test_datetime now returns items from the internal queue in the same way as ~testfixtures.datetime.MockDateTime.now.
Fix for issue #328: utcnow() of test_datetime now returns items from the internal queue in the same way as now() .
Fix bug when ShouldRaise context managers incorrectly reported what exception was incorrectly raised when the incorrectly raised exception was a KeyEr
Fix bug when ShouldRaise context managers incorrectly reported what exception was incorrectly raised when the incorrectly raised exception was a KeyError.
Added TestComponents for getting a sterile registry when testing code that uses zope.component.
Added TestComponents for getting a sterile registry when testing code that uses zope.component.
Added full Sphinx-based documentation.
Added full Sphinx-based documentation.
added a Manuel plugin for reading and writing files into a TempDirectory.
any existing log handlers present when a LogCapture is installed for a particular logger are now removed.
fix the semantics of should_raise, which should always expect an exception to be raised!
added the ShouldRaise context manager.
added recursive support to TempDirectory.listdir and added the new TempDirectory.check_all method.
added support for forward-slash separated paths to all relevant TempDirectory methods.
added TempDirectory.getpath method.
allow files and directories to be ignored by a regular expression specification when using TempDirectory.
made Comparison objects work when the attributes expected might be class attributes.
re-implement test_time so that it uses the correct way to get timezone-less time.
added ~testfixtures.datetime.MockDateTime.set along with delta and delta_type parameters to test_date, test_datetime and test_time.
allow the date class returned by the ~testfixtures.datetime.MockDate.today method to be configured.
added the OutputCapture context manager.
added the StringComparison class.
added options to ignore trailing whitespace and blank lines when comparing multi-line strings with compare.
fixed bugs in the handling of some exception types when using Comparison, ShouldRaise or should_raise.
changed wrap to correctly set __name__, along with some other attributes, which should help when using the decorators with certain testing frameworks.
fixed a bug where the @replace decorator passed a classmethod rather than the replacment to the decorated callable when replacing a classmethod
fixed a bug where the @replace decorator passed a classmethod rather than the replacment to the decorated callable when replacing a classmethod
added set method to test_date, test_datetime and test_time to allow setting the parameters for the next instance to be returned.
added delta and delta_type parameters to test_date,test_datetime and test_time to control the intervals between returned instances.
Nothing published for this version
changed Comparison to use __eq__ and __ne__ instead of the deprecated __cmp__
changed Comparison to use __eq__ and __ne__ instead of the deprecated __cmp__
documented that order matters when using Comparisons with objects that implement __eq__ themselves, such as instances of Django models.
@replace and Replacer.replace can now replace attributes that may not be present, provided the strict parameter is passed as False.
@replace and Replacer.replace can now replace attributes that may not be present, provided the strict parameter is passed as False.
should_raise now catches BaseException rather than Exception so raising of SystemExit and KeyboardInterrupt can be tested.
added support for using TempDirectory, Replacer and LogCapture as context managers.
added support for using TempDirectory, Replacer and LogCapture as context managers.
fixed test failure in Python 2.6.
fix bug where should_raise didn't complain when no exception was raised but one was expected.
fix bug where should_raise didn't complain when no exception was raised but one was expected.
clarified that the return of a should_raise call will be None in the event that an exception is raised but no expected exception is specified.
should_raise now supports methods other than __call__
should_raise now supports methods other than __call__
added makedir and check_dir methods to TempDirectory and added support for sub directories to read and write
added makedir and check_dir methods to TempDirectory and added support for sub directories to read and write
added path parameter to write method of TempDirectory so that the full path of the file written can be easilly obtained
added path parameter to write method of TempDirectory so that the full path of the file written can be easilly obtained
added handy read and write methods to TempDirectory for creating and reading files in the temporary directory
added handy read and write methods to TempDirectory for creating and reading files in the temporary directory
added support for rich comparison of objects that don't support vars()
improved representation of failed Comparison
improved representation of failed Comparison
improved representation of failed compare with sequences
fixed bug that occurs when directory was deleted by a test that use tempdir or TempDirectory
fixed bug that occurs when directory was deleted by a test that use tempdir or TempDirectory
- added TempDirectory helper - added tempdir decorator
added TempDirectory helper
added tempdir decorator
LogCaptures now auto-install on creation unless configured otherwise
LogCaptures now auto-install on creation unless configured otherwise
LogCaptures now have a clear method
LogCaptures now have a class method uninstall_all that uninstalls all instances of LogCapture. Handy for a tearDown method in doctests.
add support to Comparisons for only comparing some attributes
add support to Comparisons for only comparing some attributes
move to use zope.dottedname
- Initial Release
Initial Release
Initial Release
On this page
Changes
12.4.0 (2 Oct 2026)
12.3.0 (8 Jul 2026)
12.2.0 (20 Jun 2026)
12.1.0 (15 Jun 2026)
12.0.1 (11 Jun 2026)
12.0.0 (23 May 2026)
11.0.0 (9 Mar 2026)
10.0.0 (29 Oct 2025)
9.2.0 (13 Oct 2025)
9.1.0 (8 Jul 2025)
9.0.1 (4 Jul 2025)
9.0.0 (3 Jul 2025)
8.3.0 (7 Jun 2024)
8.2.0 (1 May 2024)
8.1.0 (1 Mar 2024)
8.0.0 (16 Feb 2024)
7.2.2 (20 Oct 2023)
7.2.1 (20 Oct 2023)
7.2.0 (15 Sep 2023)
7.1.0 (8 Feb 2023)
7.0.4 (5 Dec 2022)
7.0.3 (3 Nov 2022)
7.0.2 (1 Nov 2022)
7.0.1 (1 Nov 2022)
7.0.0 (6 Jul 2022)
6.18.5 (1 Mar 2022)
6.18.4 (25 Feb 2022)
6.18.3 (29 Sep 2021)
6.18.2 (21 Sep 2021)
6.18.1 (20 Aug 2021)
6.18.0 (15 Jul 2021)
6.17.1 (14 Jan 2020)
6.17.0 (16 Dec 2020)
6.16.0 (9 Dec 2020)
6.15.0 (9 Oct 2020)
6.14.2 (4 Sep 2020)
6.14.1 (20 Apr 2020)
6.14.0 (24 Feb 2020)
6.13.1 (20 Feb 2020)
6.13.0 (18 Feb 2020)
6.12.1 (16 Feb 2020)
6.12.0 (6 Feb 2020)
6.11.0 (29 Jan 2020)
6.10.3 (22 Nov 2019)
6.10.2 (15 Nov 2019)
6.10.1 (1 Nov 2019)
6.10.0 (19 Jun 2019)
6.9.0 (10 Jun 2019)
6.8.2 (4 May 2019)
6.8.1 (2 May 2019)
6.8.0 (2 May 2019)
6.7.1 (29 Apr 2019)
6.7.0 (11 Apr 2019)
6.6.2 (22 Mar 2019)
6.6.1 (13 Mar 2019)
6.6.0 (22 Feb 2019)
6.5.2 (18 Feb 2019)
6.5.1 (18 Feb 2019)
6.5.0 (28 Jan 2019)
6.4.3 (10 Jan 2019)
6.4.2 (9 Jan 2019)
6.4.1 (24 Dec 2018)
6.4.0 (19 Dec 2018)
6.3.0 (4 Sep 2018)
6.2.0 (14 Jun 2018)
6.1.0 (6 Jun 2018)
6.0.2 (2 May 2018)
6.0.1 (17 April 2018)
6.0.0 (27 March 2018)
5.4.0 (25 January 2018)
5.3.1 (21 November 2017)
5.3.0 (28 October 2017)
5.2.0 (3 September 2017)
5.1.1 (8 June 2017)
5.1.0 (8 June 2017)
5.0.0 (5 June 2017)
4.14.3 (15 May 2017)
4.14.2 (15 May 2017)
4.14.1 (15 May 2017)
4.14.0 (15 May 2017)
4.13.5 (1 March 2017)
4.13.4 (6 February 2017)
4.13.3 (13 December 2016)
4.13.2 (16 November 2016)
4.13.1 (2 November 2016)
4.13.0 (2 November 2016)
4.12.0 (18 October 2016)
4.11.0 (12 October 2016)
4.10.1 (5 September 2016)
4.10.0 (17 May 2016)
4.9.1 (19 February 2016)
4.9.0 (18 February 2016)
4.8.0 (2 February 2016)
4.7.0 (10 December 2015)
4.6.0 (3 December 2015)
4.5.1 (23 November 2015)
4.5.0 (13 November 2015)
4.4.0 (1 November 2015)
4.3.3 (15 September 2015)
4.3.2 (15 September 2015)
4.3.1 (15 September 2015)
4.3.0 (15 September 2015)
4.2.0 (11 August 2015)
4.1.2 (30 January 2015)
4.1.1 (30 October 2014)
4.1.0 (14 October 2014)
4.0.2 (10 September 2014)
4.0.1 (4 August 2014)
4.0.0 (22 July 2014)
3.1.0 (25 May 2014)
3.0.2 (7 April 2014)
3.0.1 (10 June 2013)
3.0.0 (5 March 2013)
2.3.5 (13 August 2012)
2.3.4 (31 January 2012)
2.3.3 (12 December 2011)
2.3.2 (10 November 2011)
2.3.1 (8 November 2011)
2.3.0 (11 October 2011)
2.2.0 (4 October 2011)
2.1.0 (29 September 2011)
2.0.1 (23 September 2011)
2.0.0 (23 September 2011)
1.12.0 (16 August 2011)
1.11.3 (3 August 2011)
1.11.2 (28 July 2011)
1.11.1 (28 July 2011)
1.11.0 (27 July 2011)
1.10.0 (19 July 2011)
1.9.2 (20 April 2011)
1.9.1 (11 March 2011)
1.9.0 (11 February 2011)
1.8.0 (14 January 2011)
1.7.0 (20 January 2010)
1.6.2 (23 September 2009)
1.6.1 (06 September 2009)
1.6.0 (09 May 2009)
1.5.4 (11 Feb 2009)
1.5.3 (17 Dec 2008)
1.5.2 (14 Dec 2008)
1.5.1 (12 Dec 2008)
1.5.0 (12 Dec 2008)
1.4.0 (12 Dec 2008)
1.3.1 (10 Dec 2008)
1.3.0 (9 Dec 2008)
1.2.0 (3 Dec 2008)
1.1.0 (3 Dec 2008)
1.0.0 (26 Nov 2008)
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →