Testfixtures

Latest version: v8.3.0

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

Scan your dependencies

Page 17 of 23

4.0.0

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

- 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

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

- Added :class:`RoundComparison` helper for comparing numerics to a
specific precision.

- Added ``unless`` parameter to :class:`ShouldRaise` to cover
some very specific edge cases.

- Fix missing imports that showed up :class:`TempDirectory` had to do
the "convoluted folder delete" dance on Windows.

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

Thanks to Matthias Lehmann for the import error reports.

3.0.2

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

- Document :attr:`ShouldRaise.raised` and make it part of the official
API.

- Fix rare failures when cleaning up :class:`TempDirectory` instances
on Windows.

3.0.1

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

- 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

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

- Added compatibility with Python 3.2 and 3.3.

- Dropped compatibility with Python 2.5.

- Removed support for the following obscure uses of
:class:`should_raise`:

.. invisible-code-block: python

from testfixtures.mock import MagicMock
should_raise = x = MagicMock()

.. code-block:: python

should_raise(x, IndexError)[1]
should_raise(x, KeyError)['x']

- Dropped the `mode` parameter to :meth:`TempDirectory.read`.

- :meth:`TempDirectory.makedir` and :meth:`TempDirectory.write` no
longer accept a `path` parameter.

- :meth:`TempDirectory.read` and :meth:`TempDirectory.write` now
accept an `encoding` parameter to control how non-byte data is
decoded and encoded respectively.

- Added the `prefix` parameter to :func:`compare` to allow failure
messages to be made more informative.

- Fixed a problem when using sub-second deltas with :any:`test_time <mock_time>`.

2.3.5

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

- Fixed a bug in :func:`~testfixtures.comparison.compare_dict` that
mean the list of keys that were the same was returned in an unsorted
order.

Page 17 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.