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.stdin of MockPopen instances.MockPopen can
now be controlled by providing a callable.LogCapture.actual() is
now part of the documented public interface.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__.ShouldAssert as
a simpler tool for testing test helpers.unittest.mock.patch() on
the same test method or function.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.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.