Wednesday, June 12, 2013

nose.tools includes unittest assert methods

I came across this gem in the nose documentation today:
The nose.tools module provides a number of testing aids that you may find useful, including ... all of the same assertX methods found in unittest.TestCase (only spelled in PEP 8 fashion, so assert_equal rather than assertEqual).
Hello nose.tools.assert_almost_equal() goodbye float comparison frustration!

No comments:

Post a Comment