Testfixtures

Latest version: v8.2.0

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

Scan your dependencies

Page 18 of 23

2.3.3

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

- Fixed a bug where when a target was replaced more than once using a
single :class:`Replacer`, :meth:`~Replacer.restore` would not
correctly restore the original.

2.3.2

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

- Fixed a bug where attributes and keys could not be
removed by a :class:`Replacer` as described in
:ref:`removing_attr_and_item` if the attribute or key might not be
there, such as where a test wants to ensure an ``os.environ``
variable is not set.

2.3.1

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

- Move to use `nose <http://readthedocs.org/docs/nose/>`__ for running
the testfixtures unit tests.

- Fixed a bug where :meth:`~testfixtures.datetime.MockDateTime.now` returned an instance of the
wrong type when `tzinfo` was passed in
:ref:`strict mode <strict-dates-and-times>`.

2.3.0

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

- :class:`Replacer`, :class:`TempDirectory`, :class:`LogCapture` and
``TestComponents`` instances will now warn if the
process they are created in exits without them being cleaned
up. Instances of these classes should be cleaned up at the end of
each test and these warnings serve to point to a cause for possible
mysterious failures elsewhere.

2.2.0

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

- Add a :ref:`strict mode <strict-dates-and-times>` to
:any:`test_datetime <mock_datetime>` and :class:`test_date <mock_date>`.
When used, instances returned from the mocks are instances of those
mocks. The default behaviour is now to return instances of the real
:class:`~datetime.datetime` and :class:`~datetime.date` classes
instead, which is usually much more useful.

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.

Page 18 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.