Closed
Bug 984921
Opened 10 years ago
Closed 9 years ago
Replace assertTrue("foo" in bar) in test_navigation.py
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox40 fixed)
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
(Keywords: pi-marionette-server)
Attachments
(2 files, 1 obsolete file)
Tests are currently doing self.assertTrue("foo" in bar) whereas self.assertIn("foo", bar) would be preferable for better debugging when a test fails.
Assignee | ||
Comment 1•10 years ago
|
||
Must be landed after bug 977893.
Comment 2•10 years ago
|
||
Comment on attachment 8392968 [details] [diff] [review] 0001-Bug-984921-Replace-assertTrue-foo-in-bar-in-test_nav.patch Review of attachment 8392968 [details] [diff] [review]: ----------------------------------------------------------------- r+ can be carried forward with cleanup of nits ::: testing/marionette/client/marionette/tests/unit/test_navigation.py @@ +3,4 @@ > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > from marionette_test import MarionetteTestCase > +from marionette import MarionetteException, TimeoutException Please put this back to multiple lines @@ +14,5 @@ > + self.iframe_doc = self.marionette.absolute_url("test_iframe.html") > + > + def test_set_location_through_execute_script(self): > + self.marionette.execute_script( > + "window.location.href = '%s'" % self.test_doc) nit: if we are going to be multilining here it would be better to split around the %. It's better to align with the delimiter if possible @@ +23,4 @@ > def test_navigate(self): > + self.marionette.navigate(self.test_doc) > + self.assertNotEqual("about:blank", self.marionette.execute_script( > + "return window.location.href;")) Nit: as above also <3 it for looking neater @@ +73,5 @@ > + self.assertTrue(self.marionette.execute_script(""" > + var elem = window.document.createElement('div'); > + elem.id = 'someDiv'; > + window.document.body.appendChild(elem); > + return true;""")) If possible can we indent here so it doesnt line up with the python
Attachment #8392968 -
Flags: review?(dburns) → review+
Assignee | ||
Comment 3•9 years ago
|
||
/r/6989 - Bug 984921: Clean up Marionette navigation tests Pull down this commit: hg pull -r 1844c906cc436ef378f07342051a44689fedba58 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8591248 -
Flags: review?(dburns)
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8591248 [details] MozReview Request: bz://984921/ato /r/6989 - Bug 984921: Clean up Marionette navigation tests Pull down this commit: hg pull -r 1844c906cc436ef378f07342051a44689fedba58 https://reviewboard-hg.mozilla.org/gecko/
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 5•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7dd44c4d895
Comment 6•9 years ago
|
||
Comment on attachment 8591248 [details] MozReview Request: bz://984921/ato https://reviewboard.mozilla.org/r/6987/#review5781 Ship It!
Attachment #8591248 -
Flags: review?(dburns) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/d286935cb11b
https://hg.mozilla.org/mozilla-central/rev/d286935cb11b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8591248 -
Attachment is obsolete: true
Attachment #8618098 -
Flags: review+
Assignee | ||
Comment 10•9 years ago
|
||
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•