Closed Bug 795681 Opened 12 years ago Closed 8 years ago

mozunit doesn't output assert errors

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: glandium, Unassigned)

Details

Attachments

(1 file)

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)
Attachment #8718692 - Flags: review?(gps) → review+
Comment on attachment 8718692 [details]
MozReview Request: Bug 795681 - Print out failures in mozunit runner. r=gps

https://reviewboard.mozilla.org/r/34705/#review31679
https://hg.mozilla.org/mozilla-central/rev/12b3f2e6e3e1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: