_eq
seems to be the equal to self.assertEqual()
But is there also a self.assertNotEqual()
in nose?
Thanks
Nose doesn't have an equivalent to self.assertNotEqual()
, but you can use all of the unittest.TestCase
assert methods via nose.tools
. They are renamed to all-lowercase and with underscores. For example:
>>> from nose.tools import assert_not_equal
>>> assert_not_equal(1, 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 518, in assertNotEqual
raise self.failureException(msg)
AssertionError: 1 == 1
More info here.
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