[py-dev] Advanced assert equal

Floris Bruynooghe flub at devork.be
Wed Sep 22 02:11:27 CEST 2010


Hi Holger

I've updated my repo with the following changes:

* Don't use py.test.config, using Holger's suggestion of an attribute
on AssertionError
* Renamed pytest_assert_compare to pytest_assert_binrepr
* Moved all tests to testing/plugin/test_pytest_assertion.py
* Implemented the default hook to pretty much mirror unittest2's behaviour.
* Added examples in doc/examples/assertion/failure_demo.py - I found
this easier to work with then the actual tests

I guess the main thing now is to fine-tune the default reporting for
various cases.  I'm fairly tempted not to try and predict too much in
this area and rather wait to tune these till they come up.

Related to this you said you'd like to see "x in y" and "x != y" for
some types.  Could you be more specific as I can't think of what you'd
like to do with "in" or "!=", I'm probably lacking creativity right
now...


I'm happy to hear feedback anyone might have, I've probably still missed things.

Regards
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org



More information about the Pytest-dev mailing list