Testfixtures

Latest version: v8.2.0

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

Scan your dependencies

Page 1 of 23

8.2.0

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

- The ``strict`` option is now correctly respected when :doc:`comparing <comparing>` nested objects.

- When comparing :class:`~datetime.datetime` or :class:`~datetime.time` instances, if the fold
is the only thing that's different, it's now shown in the output.

- A more detailed exception is now raised when resolving a :doc:`replacement <mocking>` doesn't give
what's expected.

- :doc:`Replacement <mocking>` of methods on instances is now prevented when ``strict=True``.

- An exception is now raised when :doc:`mocking <mocking>` and the original is not in the
``__dict__`` of its containing objects.

8.1.0

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

- Fix bug where replacement of methods on subclasses failed when using :meth:`Replacer.on_class`.

- Implement :ref:`strict comparison <compare-datetime>` as an option for :class:`~datetime.datetime`
and :class:`~datetime.time`.

8.0.0

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

- Retire ``zope.component`` helpers.

- Support :class:`bytes` in :class:`popen.MockPopen` commands.

- Allow :class:`TempDirectory` instances to be traversed as :class:`~pathlib.Path` objects.

- Use the system default encoding where possible in :class:`TempDirectory`.

- Add :class:`TempDirectory` option to manage current working directory.

- Allow string class attributes to be replaced with :class:`Replacer` and friends.

- Fix nasty bug meaning some :meth:`~Replacer.on_class` and :meth:`~Replacer.in_module`
replacements weren't restored.

- Allow an alternative separator to be used for traversal during replacement with
:class:`Replacer` and friends.

- Officially support Python 3.12.

- Drop support Python 3.6.

7.2.2

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

- Fix bug in support for :class:`os.PathLike` arguments to :class:`popen.MockPopen`.

7.2.1

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

- Added missing support for :class:`os.PathLike` arguments to :class:`popen.MockPopen`.

7.2.0

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

- Add ``order_matters`` parameter to :class:`ShouldWarn`.

Thanks to Jan Musílek for the implementation!

Page 1 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.