Testfixtures

Latest version: v8.3.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 23

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

Page 6 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.