Testfixtures

Latest version: v8.3.0

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

Scan your dependencies

Page 19 of 23

2.1.0

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

- Add a :ref:`strict mode <strict-comparison>` to
:func:`compare`. When used, it ensures that
the values compared are not only equal but also of the same
type. This mode is not used by default, and the default mode
restores the more commonly useful functionality where values of
similar types but that aren't equal give useful feedback about
differences.

2.0.1

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

- add back functionality to allow comparison of generators with
non-generators.

2.0.0

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

- :func:`compare` now uses a registry of comparers that can be
modified either by passing a `registry` option to :func:`compare`
or, globally, using the :func:`~comparison.register` function.

- added a comparer for :class:`set` instances to :func:`compare`.

- added a new `show_whitespace` parameter to
:func:`~comparison.compare_text`, the comparer used when comparing
strings and unicodes with :func:`compare`.

- The internal queue for :any:`test_datetime <mock_datetime>` is now considered to
be in local time. This has implication on the values returned from
both :meth:`~testfixtures.datetime.MockDateTime.now` and :meth:`~testfixtures.datetime.MockDateTime.utcnow` when
`tzinfo` is passed to the :any:`test_datetime <mock_datetime>` constructor.

- :meth:`~testfixtures.datetime.MockDate.set` and :meth:`~testfixtures.datetime.MockDate.add` on
:class:`test_date <mock_date>`,
:any:`test_datetime <mock_datetime>` and :class:`test_time <mock_time>` now accept instances
of the appropriate type as an alternative to just passing in the
parameters to create the instance.

- Refactored the monolithic ``__init__.py`` into modules for each
type of functionality.

1.12.0

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

- Add a :attr:`~OutputCapture.captured` property to
:class:`OutputCapture` so that more complex assertion can be made
about the output that has been captured.

- :class:`OutputCapture` context managers can now be temporarily
disabled using their :meth:`~OutputCapture.disable` method.

- Logging can now be captured only when it exceeds a specified logging
level.

- The handling of timezones has been reworked in both
:any:`test_datetime <mock_datetime>` and :any:`test_time <mock_time>`. This is not backwards
compatible but is much more useful and correct.

1.11.3

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

- Fix bugs where various :class:`test_date <mock_date>`, :class:`test_datetime <mock_datetime>` and
:class:`test_time <mock_time>` methods didn't accept keyword parameters.

1.11.2

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

- Fix for 1.10 and 1.11 releases that didn't include non-.py files as
a result of the move from subversion to git.

Page 19 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.