Closed Bug 788828 Opened 12 years ago Closed 12 years ago

Allow moztest to take in a computed result and infer the expected & actual results

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mihneadb, Assigned: mihneadb)

References

Details

Attachments

(2 files)

      No description provided.
Assignee: nobody → mbalaur
Attached patch $SUBJECTSplinter Review
Attachment #658656 - Flags: review?(jgriffin)
Blocks: 786848
Comment on attachment 658656 [details] [diff] [review]
$SUBJECT

Review of attachment 658656 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!

::: moztest/moztest/results.py
@@ +160,5 @@
> +            self.result = result
> +        elif result in self.POSSIBLE_RESULTS:
> +            self._result_actual = result
> +            self.result = self.calculate_result(self._result_expected,
> +                                            self._result_actual)

You should check for self.POSSIBLE_RESULTS before self.COMPUTED_RESULTS, otherwise you won't correctly handle unexpected successes for the case where you call __init__('FAIL') and finish('PASS').  You can then remove the check for 'PASS' and 'ERROR' in infer_results() (since for the latter, the default expected result is 'PASS' anyway).
Attachment #658656 - Flags: review?(jgriffin) → review+
https://github.com/mozilla/mozbase/commit/a5f76f09bf367df9da277e8c9c0ad02ff457c8f8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Some changes needed still; I pushed prematurely.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #659291 - Flags: review?(jgriffin)
Comment on attachment 659291 [details] [diff] [review]
last minute fixes

Review of attachment 659291 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for the quick fix!
Attachment #659291 - Flags: review?(jgriffin) → review+
https://github.com/mozilla/mozbase/commit/30a2b278430e0ab9946e0e93197b3f8ded8c634a
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: