Closed Bug 795681 Opened 7 years ago Closed 4 years ago
mozunit doesn't output assert errors
58 bytes, text/x-review-board-request
mozunit does print out exceptions when they occur, but it doesn't do the same for asserts, which makes debugging errors uselessly difficuly.
Python's unittest separates errors and failures, where the former is uncaught exceptions and the latter uncaught assertions. We were only printing the former, making the mozunit runner output useless to debug failures due to assertions in the code being tested. I would usually edit the test to temporarily switch to unittest.main(). Enough is enough, handle failures properly. At the same time, instead of printing all the errors one after the other at the end, print them right after the TEST-UNEXPECTED-FAIL message. Review commit: https://reviewboard.mozilla.org/r/34705/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/34705/
Attachment #8718692 - Flags: review?(gps)
Comment on attachment 8718692 [details] MozReview Request: Bug 795681 - Print out failures in mozunit runner. r=gps https://reviewboard.mozilla.org/r/34705/#review31679
You need to log in before you can comment on or make changes to this bug.