Open Bug 1159108 Opened 5 years ago Updated 5 years ago

Assertions for single test need to be factored out as a utility method in selftest.py

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: hiro, Assigned: hiro)

Details

Attachments

(1 file)

Assignee: nobody → hiikezoe
Attached patch Proposed patchSplinter Review
Create two new method named assertSingleTestPassed and assertSingleTestFailed, and use these methods as possible.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b5788123f46b
Attachment #8598459 - Flags: review?(ted)
Comment on attachment 8598459 [details] [diff] [review]
Proposed patch

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

::: testing/xpcshell/selftest.py
@@ +454,5 @@
> +        self.assertEquals(1, self.x.testCount)
> +        self.assertEquals(0, self.x.passCount)
> +        self.assertEquals(1, self.x.failCount)
> +        self.assertEquals(0, self.x.todoCount)
> +        self.assertNotInLog(TEST_PASS_STRING)

Is there a reason you didn't put `self.assertInLog(TEST_FAIL_STRING)` in here? All the call sites seem to call that.
Attachment #8598459 - Flags: review?(ted) → review+
Also thanks for the patch!
You need to log in before you can comment on or make changes to this bug.