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

Update testfixtures to 6.10.2 #83

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates testfixtures from 5.1.1 to 6.10.2.

Changelog

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 #84

@pyup-bot pyup-bot closed this Nov 23, 2019
@kulapard kulapard deleted the pyup-update-testfixtures-5.1.1-to-6.10.2 branch November 23, 2019 14:10
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