testfixtures 6.0.0 released!

4 views
Skip to first unread message

Chris Withers

unread,
Mar 27, 2018, 1:37:21 PM3/27/18
to simpl...@googlegroups.com, testing-...@lists.idyll.org, Python List, Daniel Fortunov, wim glenn, hamish...@linguamatics.com, t...@timdavies.xyz
Hi All,

I'm pleased to announce the release of testfixtures 6.0.0 featuring the following:
  • compare() will now handle objects that do not natively support equality or inequality and will treat these objects as equal if they are of the same type and have the same attributes as found using vars() or __slots__. This is a change in behaviour which, while it could conceivably cause tests that are currently failing to pass, should not cause any currently passing tests to start failing.
  • Add support for writing to the stdin of MockPopen instances.
  • The default behaviour of MockPopen can now be controlled by providing a callable.
  • LogCapture.actual() is now part of the documented public interface.
  • Add LogCapture.check_present() to help with assertions about a sub-set of messages logged along with those that are logged in a non-deterministic order.
  • Comparison now supports objects with __slots__.
  • Added ShouldAssert as a simpler tool for testing test helpers.
  • Changed the internals of the various decorators testfixtures provides such that they can be used in conjunction with unittest.mock.patch() on the same test method or function.
  • Changed the internals of ShouldRaise and Comparison to make use of compare() and so provide nested comparisons with better feedback. This finally allows ShouldRaise to deal with Django’s ValidationError.
  • Added handling of self-referential structures to compare() by treating all but the first occurence as equal. Another change needed to support Django’s insane ValidationError.

Thanks to Hamish Downer and Tim Davies for their work on MockPopen.

Thanks to Wim Glenn and Daniel Fortunov for their help reviewing some of the more major changes.

The package is on PyPI and a full list of all the links to docs, issue trackers and the like can be found here:

https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the Simplistix open source mailing list...

cheers,

Chris
Reply all
Reply to author
Forward
0 new messages