Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Update testfixtures to 6.17.1 #116

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates testfixtures from 5.1.1 to 6.17.1.

Changelog

6.17.1

--------------------

- Fix bug where bug where duplicated entries in an ordered but partial
:class:`SequenceComparison` could result in a failed match.

6.17.0

--------------------

- Add simpler flag support to :class:`StringComparison`.

- Fix deprecation warning about invalid escape sequence.

Thanks to Wim Glenn for the deprecation warning fix.

6.16.0

-------------------

- Simplify and clarify the documentation of timezones when using :class:`test_datetime`.

- :doc:`api` has been re-arranged to make it easier to browse.

- The ``strict`` parameter to :class:`Comparison` has been deprecated in favour of ``partial``.

- Add :class:`SequenceComparison`, :class:`Subset` and :class:`Permutation` objects.

- Add :class:`MappingComparison` objects.

- Officially support Python 3.9.

6.15.0

-------------------

- 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

-------------------

- 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

--------------------

- Fix bugs in comparison of :func:`~unittest.mock.call` objects where the :func:`repr` of the
:func:`~unittest.mock.call` arguments were the same even when their attributes were not.

6.14.0

--------------------

- Add support for non-deterministic logging order when using :meth:`twisted.LogCapture`.

6.13.1

--------------------

- Fix for using :func:`compare` to compare two-element :func:`~unittest.mock.call`
objects.

Thanks to Daniel Fortunov for the fix.

6.13.0

--------------------

- Allow any attributes that need to be ignored to be specified directly when calling
:func:`~testfixtures.comparison.compare_object`. This is handy when writing
comparers for :func:`compare`.

6.12.1

--------------------

- 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

-------------------

- Add support for ``universal_newlines``, ``text``, ``encoding`` and ``errors`` to
:class:`popen.MockPopen`, but only for Python 3.

6.11.0

--------------------

- :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

--------------------

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

6.10.2

--------------------

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

6.10.1

-------------------

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

6.10.0

--------------------

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

6.9.0

-------------------

- Fix deprecation warning relating to :func:`getargspec`.

- Improve :doc:`mocking <mocking>` docs.

- Added ``strip_whitespace`` option to :class:`OutputCapture`.

- When ``separate`` is used with :class:`OutputCapture`, differences in ``stdout`` and ``stderr``
are now given in the same :class:`AssertionError`.

- :class:`ShouldRaise` no longer catches exceptions that are not of the required type.

- Fixed a problem that resulted in unhelpful :func:`compare` failures when
:func:`~unittest.mock.call` was involved and Python 3.6.7 was used.

Thanks to Łukasz Rogalski for the deprecation warning fix.

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

6.8.2

------------------

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

6.8.1

------------------

- Fix bogus import in :class:`OutputCapture`.

6.8.0

------------------

- Allow :class:`OutputCapture` to capture the underlying file descriptors for
:attr:`sys.stdout` and :attr:`sys.stderr`.

6.7.1

-------------------

- Silence :class:`DeprecationWarning` relating to ``collections.abc`` on
Python 3.7.

Thanks to Tom Hendrikx for the fix.

6.7.0

-------------------

- Add :meth:`twisted.LogCapture.raise_logged_failure` debugging helper.

6.6.2

-------------------

- :meth:`popen.MockPopen.set_command` is now symmetrical with
:class:`popen.MockPopen` process instantiation in that both can be called with
either lists or strings, in the same way as :class:`subprocess.Popen`.

6.6.1

-------------------

- 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

-------------------

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

6.5.2

-------------------

- 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

-------------------

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

6.5.0

-------------------

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

6.4.3

-------------------

- Fix problems on Python 2 when the rolling backport of `mock`__ was not installed.

__ https://mock.readthedocs.io

6.4.2

------------------

- Fixed typo in the ``executable`` parameter name for :class:`~testfixtures.popen.MockPopen`.

- Fixed :func:`~unittest.mock.call` patching to only patch when needed.

- Fixed :func:`compare` with :func:`~unittest.mock.call` objects for the latest Python releases.

6.4.1

-------------------

- 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

-------------------

- Add official support for Python 3.7.

- Drop official support for Python 3.5.

- Introduce a facade for :mod:`unittest.mock` at :mod:`testfixtures.mock`, including an
important bug fix for :func:`~unittest.mock.call` objects.

- Better feedback when :func:`~unittest.mock.call` comparisons fail when using :func:`compare`.

- A re-working of :class:`~testfixtures.popen.MockPopen` to enable it to handle multiple
processes being active at the same time.

- Fixes to :doc:`datetime` documentation.

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

6.3.0

------------------

- Allow the behaviour specified with :meth:`~testfixtures.popen.MockPopen.set_command` to be a
callable meaning that mock behaviour can now be dynamic based on the command executed and whatever
was sent to ``stdin``.

- Make :class:`~testfixtures.popen.MockPopen` more accurately reflect :class:`subprocess.Popen`
on Python 3 by adding ``timeout`` parameters to :meth:`~testfixtures.popen.MockPopen.wait` and
:meth:`~testfixtures.popen.MockPopen.communicate` along with some other smaller changes.

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

6.2.0

-------------------

- Better rendering of differences between :class:`bytes` when using :func:`compare`
on Python 3.

6.1.0

------------------

- Support filtering for specific warnings with :class:`ShouldWarn`.

6.0.2

------------------

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

6.0.1

---------------------

- Fix a bug when comparing equal :class:`set` instances using :func:`compare`
when ``strict==True``.

6.0.0

---------------------

- :func:`compare` will now handle objects that do not natively support equality or inequality
and will treat these objects as equal if they are of the same type and have the same attributes
as found using :func:`vars` or ``__slots__``. This is a change in behaviour which, while it could
conceivably cause tests that are currently failing to pass, should not cause any currently
passing tests to start failing.

- Add support for writing to the ``stdin`` of :class:`~testfixtures.popen.MockPopen` instances.

- The default behaviour of :class:`~testfixtures.popen.MockPopen` can now be controlled by
providing a callable.

- :meth:`LogCapture.actual` is now part of the documented public interface.

- Add :meth:`LogCapture.check_present` to help with assertions about a sub-set of messages logged
along with those that are logged in a non-deterministic order.

- :class:`Comparison` now supports objects with ``__slots__``.

- Added :class:`ShouldAssert` as a simpler tool for testing test helpers.

- Changed the internals of the various decorators testfixtures provides such that they can
be used in conjunction with :func:`unittest.mock.patch` on the same test method or function.

- Changed the internals of :class:`ShouldRaise` and :class:`Comparison` to make use of
:func:`compare` and so provide nested comparisons with better feedback. This finally
allows :class:`ShouldRaise` to deal with Django's
:class:`~django.core.exceptions.ValidationError`.

- Added handling of self-referential structures to :func:`compare` by treating all but the first
occurence as equal. Another change needed to support Django's insane
:class:`~django.core.exceptions.ValidationError`.

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

-----------------------

- Add explicit support for :class:`~unittest.mock.Mock` to :func:`compare`.

5.3.1

------------------------

- Fix missing support for the `start_new_session` parameter to
:class:`~testfixtures.popen.MockPopen`.

5.3.0

-----------------------

- Add pytest traceback hiding for :meth:`TempDirectory.compare`.

- Add warnings that :func:`log_capture`, :func:`tempdir` and
:func:`replace` are not currently compatible with pytest's fixtures
mechanism.

- Better support for ``stdout`` or ``stderr`` *not* being set to ``PIPE``
when using :class:`~testfixtures.popen.MockPopen`.

- Add support to :class:`~testfixtures.popen.MockPopen` for
using :class:`subprocess.Popen` as a context manager in Python 3.

- Add support to :class:`~testfixtures.popen.MockPopen` for ``stderr=STDOUT``.

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

5.2.0

------------------------

- :class:`test_datetime` and :class:`test_time` now accept a
:class:`~datetime.datetime` instance during instantiation to set the initial
value.

- :class:`test_date` now accepts a :class:`~datetime.date` instance during
instantiation to set the initial value.

- Relax the restriction on adding, setting or instantiating :class:`test_datetime`
with `tzinfo` such that if the `tzinfo` matches the one configured,
then it's okay to add.
This means that you can now instantiate a :class:`test_datetime` with an existing
:class:`~datetime.datetime` instance that has `tzinfo` set.

- :func:`testfixtures.django.compare_model` now ignores
:class:`many to many <django.db.models.ManyToManyField>` fields rather than
blowing up on them.

- Drop official support for Python 3.4, although things should continue to
work.
Links

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #125

@pyup-bot pyup-bot closed this Jul 15, 2021
@kulapard kulapard deleted the pyup-update-testfixtures-5.1.1-to-6.17.1 branch July 15, 2021 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant