Testfixtures

Latest version: v8.2.0

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

Scan your dependencies

Page 20 of 23

1.11.0

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

- Give more useful output when comparing dicts and their subclasses.

- Turn :class:`should_raise` into a decorator form of
:class:`ShouldRaise` rather than the rather out-moded wrapper
function that it was.

1.10.0

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

- Remove dependency on ``zope.dottedname``.

- Implement the ability to mock out :class:`dict` and :class:`list`
items using :class:`~testfixtures.Replacer` and
:func:`~testfixtures.replace`.

- Implement the ability to remove attributes and :class:`dict`
items using :class:`~testfixtures.Replacer` and
:func:`~testfixtures.replace`.

1.9.2

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

- Fix for issue 328: :meth:`~testfixtures.datetime.MockDateTime.utcnow` of :any:`test_datetime <mock_datetime>`
now returns items from the internal queue in the same way as
:meth:`~testfixtures.datetime.MockDateTime.now`.

1.9.1

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

- Fix bug when :class:`ShouldRaise` context managers incorrectly
reported what exception was incorrectly raised when the incorrectly
raised exception was a :class:`KeyError`.

1.9.0

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

- Added ``TestComponents`` for getting a sterile
registry when testing code that uses ``zope.component``.

1.8.0

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

- Added full Sphinx-based documentation.

- added a `Manuel <http://packages.python.org/manuel/>`__ plugin for
reading and writing files into a :class:`TempDirectory`.

- any existing log handlers present when a :class:`LogCapture` is
installed for a particular logger are now removed.

- fix the semantics of :class:`should_raise`, which should always
expect an exception to be raised!

- added the :class:`ShouldRaise` context manager.

- added recursive support to :meth:`TempDirectory.listdir` and added
the new ``TempDirectory.check_all`` method.

- added support for forward-slash separated paths to all relevant
:class:`TempDirectory` methods.

- added :meth:`TempDirectory.getpath` method.

- allow files and directories to be ignored by a regular expression
specification when using :class:`TempDirectory`.

- made :class:`Comparison` objects work when the attributes expected
might be class attributes.

- re-implement :any:`test_time <mock_time>` so that it uses the correct way to
get timezone-less time.

- added :meth:`~testfixtures.datetime.MockDateTime.set` along with `delta` and `delta_type`
parameters to :any:`test_date <mock_date>`, :any:`test_datetime <mock_datetime>` and
:any:`test_time <mock_time>`.

- allow the date class returned by the :meth:`~testfixtures.datetime.MockDate.today` method
to be configured.

- added the :class:`OutputCapture` context manager.

- added the :class:`StringComparison` class.

- added options to ignore trailing whitespace and blank lines when
comparing multi-line strings with :func:`compare`.

- fixed bugs in the handling of some exception types when using
:class:`Comparison`, :class:`ShouldRaise` or :class:`should_raise`.

- changed :func:`wrap` to correctly set __name__, along with some
other attributes, which should help when using the decorators with
certain testing frameworks.

Page 20 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.