Using the Java JUnit framework and comparing the strings "abcde" and "abde" you would get the error output 'expected:<...b[c]d...> but was: <...b[]d...>'
Using python unittest I get "abcde" != "abde" which is not all as useful if you are dealing with long strings.
So my question is: Is there a python unit test framework that gives the same compact output as JUnit for Java?
The unittest2 package is a backport (to Python >= 2.4) of features that are native to the PyUnit (unittest) framework in Python 2.7.
It includes enhanced string comparison features.
http://www.voidspace.org.uk/python/articles/unittest2.shtml#unicode-string-comparison
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With