Skip to content

Latest commit

 

History

History
1124 lines (730 loc) · 33.5 KB

CHANGELOG.rst

File metadata and controls

1124 lines (730 loc) · 33.5 KB

Changes

.. currentmodule:: testfixtures

6.15.0 (9 Oct 2020)

  • Add support to :class:`LogCapture` for making sure log entries above a specified level have been checked.

Thanks to Zoltan Farkas for the implementation.

6.14.2 (4 Sep 2020)

  • Fix bug where ignore_eq had no effect on nested objects when using :func:`compare`.

Thanks to Grégoire Payen de La Garanderie for the fix.

6.14.1 (20 Apr 2020)

6.14.0 (24 Feb 2020)

6.13.1 (20 Feb 2020)

Thanks to Daniel Fortunov for the fix.

6.13.0 (18 Feb 2020)

6.12.1 (16 Feb 2020)

  • Fix a bug that occured when using :func:`compare` to compare a string with a slotted object that had the same :func:`repr` as the string.

6.12.0 (6 Feb 2020)

6.11.0 (29 Jan 2020)

  • :class:`decimal.Decimal` now has better representation when :func:`compare` displays a failed comparison, particularly on Python 2.
  • Add support to :func:`compare` for explicitly naming objects to be compared as x and y. This allows symmetry with the x_label and y_label parameters that are now documented.
  • Restore ability for :class:`Comparison` to compare properties and methods, although these uses are not recommended.

Thanks to Daniel Fortunov for all of the above.

6.10.3 (22 Nov 2019)

  • Fix bug where new-style classes had their attributes checked with :func:`compare` even when they were of different types.

6.10.2 (15 Nov 2019)

  • Fix bugs in :func:`compare` when comparing objects which have both __slots__ and a __dict__.

6.10.1 (1 Nov 2019)

  • Fix edge case where string interning made dictionary comparison output much less useful.

6.10.0 (19 Jun 2019)

  • Better feedback where objects do not :func:`compare` equal but do have the same representation.

6.9.0 (10 Jun 2019)

Thanks to Łukasz Rogalski for the deprecation warning fix.

Thanks to Wim Glenn for the :class:`ShouldRaise` idea.

6.8.2 (4 May 2019)

  • Fix handling of the latest releases of the :mod:`mock` backport.

6.8.1 (2 May 2019)

6.8.0 (2 May 2019)

6.7.1 (29 Apr 2019)

Thanks to Tom Hendrikx for the fix.

6.7.0 (11 Apr 2019)

6.6.2 (22 Mar 2019)

6.6.1 (13 Mar 2019)

  • Fixed bugs where using :attr:`not_there` to ensure a key or attribute was not there but would be set by a test would result in the test attribute or key being left behind.
  • Add support for comparing :func:`~functools.partial` instances and fix comparison of functions and other objects where vars() returns an empty :class:`dict`.

6.6.0 (22 Feb 2019)

  • Add the ability to ignore attributes of particular object types when using :func:`compare`.

6.5.2 (18 Feb 2019)

  • Fix bug when :func:`compare` was used with objects that had __slots__ inherited from a base class but where their __slots__ was an empty sequence.

6.5.1 (18 Feb 2019)

  • Fix bug when :func:`compare` was used with objects that had __slots__ inherited from a base class.

6.5.0 (28 Jan 2019)

  • Experimental support for making assertions about events logged with Twisted's logging framework.

6.4.3 (10 Jan 2019)

  • Fix problems on Python 2 when the rolling backport of mock was not installed.

6.4.2 (9 Jan 2019)

6.4.1 (24 Dec 2018)

  • Fix bug when using :func:`unittest.mock.patch` and any of the testfixtures decorators at the same time and where the object being patched in was not hashable.

6.4.0 (19 Dec 2018)

Thanks to Augusto Wagner Andreoli for his work on the :doc:`datetime` documentation.

6.3.0 (4 Sep 2018)

Thanks to Tim Davies for his work on :class:`~testfixtures.popen.MockPopen`.

6.2.0 (14 Jun 2018)

6.1.0 (6 Jun 2018)

6.0.2 (2 May 2018)

  • Fix nasty bug where objects that had neither __dict__ nor __slots__ would always be considered equal by :func:`compare`.

6.0.1 (17 April 2018)

6.0.0 (27 March 2018)

Thanks to Hamish Downer and Tim Davies for their work on :class:`~testfixtures.popen.MockPopen`.

Thanks to Wim Glenn and Daniel Fortunov for their help reviewing some of the more major changes.

5.4.0 (25 January 2018)

5.3.1 (21 November 2017)

5.3.0 (28 October 2017)

Thanks to Tim Davies for his work on :class:`~testfixtures.popen.MockPopen`.

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)

  • Fix build environment bug in .travis.yml that caused bad tarballs.

4.14.2 (15 May 2017)

  • New release as it looks like Travis mis-built the 4.14.1 tarball.

4.14.1 (15 May 2017)

  • Fix mis-merge.

4.14.0 (15 May 2017)

4.13.5 (1 March 2017)

  • :func:`compare` now correctly compares nested empty dictionaries when using ignore_eq=True.

4.13.4 (6 February 2017)

4.13.3 (13 December 2016)

  • :func:`compare` now better handles equality comparison with ignore_eq=True when either of the objects being compared cannot be hashed.

4.13.2 (16 November 2016)

Thanks to "mlabonte" for the bug report.

4.13.1 (2 November 2016)

  • When ignore_eq is used with :func:`compare`, fall back to comparing by hash if not type-specific comparer can be found.

4.13.0 (2 November 2016)

  • Add support to :func:`compare` for ignoring broken __eq__ implementations.

4.12.0 (18 October 2016)

4.11.0 (12 October 2016)

4.10.1 (5 September 2016)

Thanks to Maximilian Albert for the :meth:`TempDirectory.compare` docs.

4.10.0 (17 May 2016)

Thanks to Asaf Peleg for the :class:`RangeComparison` implementation.

4.9.1 (19 February 2016)

  • Fix for use with PyPy, broken since 4.8.0.

Thanks to Nicola Iarocci for the pull request to fix.

4.9.0 (18 February 2016)

  • Added the suffix parameter to :func:`compare` to allow failure messages to include some additional context.
  • Update package metadata to indicate Python 3.5 compatibility.

Thanks for Felix Yan for the metadata patch.

Thanks to Wim Glenn for the suffix patch.

4.8.0 (2 February 2016)

4.7.0 (10 December 2015)

  • Add the ability to pass raises=False to :func:`compare` to just get the resulting message back rather than having an exception raised.

4.6.0 (3 December 2015)

4.5.1 (23 November 2015)

Thanks to "tell-k" for the patch.

4.5.0 (13 November 2015)

Thanks to Daniel Fortunov for the pull request.

4.4.0 (1 November 2015)

  • Add support for labelling the arguments passed to :func:`compare`.
  • Allow expected and actual keyword parameters to be passed to :func:`compare`.
  • Fix TypeError: unorderable types when :func:`compare` found multiple differences in sets and dictionaries on Python 3.
  • Add official support for Python 3.5.
  • Drop official support for Python 2.6.

Thanks to Daniel Fortunov for the initial ideas for explicit expected and actual support in :func:`compare`.

4.3.3 (15 September 2015)

  • Add wheel distribution to release.
  • Attempt to fix up various niggles from the move to Travis CI for doing releases.

4.3.2 (15 September 2015)

  • Fix broken 4.3.1 tag.

4.3.1 (15 September 2015)

  • Fix build problems introduced by moving the build process to Travis CI.

4.3.0 (15 September 2015)

4.2.0 (11 August 2015)

Thanks to BATS Global Markets for donating the code for :class:`~testfixtures.popen.MockPopen`.

4.1.2 (30 January 2015)

Thanks to Daniel Fortunov for the documentation clarification.

4.1.1 (30 October 2014)

Thanks to John Kristensen for the fix.

4.1.0 (14 October 2014)

Thanks to Daniel Fortunov for the :func:`compare` fix.

4.0.2 (10 September 2014)

  • Fix "maximum recursion depth exceeded" when comparing a string with bytes that did not contain the same character.

4.0.1 (4 August 2014)

  • Fix bugs when string compared equal and options to :func:`compare` were used.
  • Fix bug when strictly comparing two nested structures containing identical objects.

4.0.0 (22 July 2014)

  • Moved from buildout to virtualenv for development.
  • The identity singleton is no longer needed and has been removed.
  • :func:`compare` will now work recursively on data structures for which it has registered comparers, giving more detailed feedback on nested data structures. Strict comparison will also be applied recursively.
  • Re-work the interfaces for using custom comparers with :func:`compare`.
  • Better feedback when comparing :func:`collections.namedtuple` instances.
  • Official support for Python 3.4.

Thanks to Yevgen Kovalienia for the typo fix in :doc:`datetime`.

3.1.0 (25 May 2014)

Thanks to Jon Thompson for the :class:`RoundComparison` implementation.

Thanks to Matthias Lehmann for the import error reports.

3.0.2 (7 April 2014)

3.0.1 (10 June 2013)

  • Some documentation tweaks and clarifications.
  • Fixed a bug which masked exceptions when using :func:`compare` with a broken generator.
  • Fixed a bug when comparing a generator with a non-generator.
  • Ensure :class:`LogCapture` cleans up global state it may effect.
  • Fixed replacement of static methods using a :class:`Replacer`.

3.0.0 (5 March 2013)

2.3.5 (13 August 2012)

2.3.4 (31 January 2012)

  • Fixed compatibility with Python 2.5
  • Fixed compatibility with Python 2.7
  • Development model moved to continuous integration using Jenkins.
  • Introduced Tox based testing to ensure packaging and dependencies are as expected.
  • 100% line and branch coverage with tests.
  • Mark :class:`test_datetime`, :class:`test_date` and :class:`test_time` such that nose doesn't mistake them as tests.

2.3.3 (12 December 2011)

2.3.2 (10 November 2011)

  • Fixed a bug where attributes and keys could not be removed by a :class:`Replacer` as described in :ref:`removing_attr_and_item` if the attribute or key might not be there, such as where a test wants to ensure an os.environ variable is not set.

2.3.1 (8 November 2011)

2.3.0 (11 October 2011)

2.2.0 (4 October 2011)

2.1.0 (29 September 2011)

  • Add a :ref:`strict mode <strict-comparison>` to :func:`compare`. When used, it ensures that the values compared are not only equal but also of the same type. This mode is not used by default, and the default mode restores the more commonly useful functionality where values of similar types but that aren't equal give useful feedback about differences.

2.0.1 (23 September 2011)

  • add back functionality to allow comparison of generators with non-generators.

2.0.0 (23 September 2011)

1.12.0 (16 August 2011)

1.11.3 (3 August 2011)

1.11.2 (28 July 2011)

  • 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.

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)

  • 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.

1.6.2 (23 September 2009)

  • 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.

1.6.1 (06 September 2009)

  • @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.

1.6.0 (09 May 2009)

  • added support for using TempDirectory, Replacer and LogCapture as context managers.
  • fixed test failure in Python 2.6.

1.5.4 (11 Feb 2009)

  • 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.

1.5.3 (17 Dec 2008)

  • should_raise now supports methods other than __call__

1.5.2 (14 Dec 2008)

  • added makedir and check_dir methods to TempDirectory and added support for sub directories to read and write

1.5.1 (12 Dec 2008)

  • added path parameter to write method of TempDirectory so that the full path of the file written can be easilly obtained

1.5.0 (12 Dec 2008)

  • 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()

1.4.0 (12 Dec 2008)

  • improved representation of failed Comparison
  • improved representation of failed compare with sequences

1.3.1 (10 Dec 2008)

  • fixed bug that occurs when directory was deleted by a test that use tempdir or TempDirectory

1.3.0 (9 Dec 2008)

  • added TempDirectory helper
  • added tempdir decorator

1.2.0 (3 Dec 2008)

  • 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.

1.1.0 (3 Dec 2008)

  • add support to Comparisons for only comparing some attributes
  • move to use zope.dottedname

1.0.0 (26 Nov 2008)

  • Initial Release