Testfixtures

Latest version: v8.2.0

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

Scan your dependencies

Page 17 of 23

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.

2.3.4

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

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

__ http://tox.testrun.org/latest/

- 100% line and branch coverage with tests.

- Mark :any:`test_datetime <mock_datetime>` , :class:`test_date <mock_date>` and
:class:`test_time <mock_time>` such that nose doesn't mistake them as tests.

Page 17 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.