Fiddle it so that the assertEquals on line 13 fails (e.g. change range(10) to range(11)) and run it and you'll get this result: ---------------------------------------------------------------------- Ran 3 tests in 0.001s
FAILED (failures=1)
Now, edit it again and replace the self.assertEquals with a normal assert and run it again and you'll get this result: ---------------------------------------------------------------------- Ran 3 tests in 0.001s
Comment
I think one of the benefit of using the module methods are the analysis you can get at the end of tests. How many passed, failed, etc...
Replies
No, the summary is the same me thinks. Take this example code:
http://docs.python.org/library/unittest.html#basic-example
Fiddle it so that the assertEquals on line 13 fails (e.g. change range(10) to range(11)) and run it and you'll get this result:
----------------------------------------------------------------------
Ran 3 tests in 0.001s
FAILED (failures=1)
Now, edit it again and replace the self.assertEquals with a normal assert and run it again and you'll get this result:
----------------------------------------------------------------------
Ran 3 tests in 0.001s
FAILED (failures=1)