Closed Bug 1256978 Opened 4 years ago Closed 4 years ago

[refactor] Use self.capabilities instead of self._capabilities where ever possible in BaseMarionetteTestRunner

Categories

(Testing :: Marionette, defect)

defect
Not set

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: maja_zf, Assigned: nathalier, Mentored)

Details

(Keywords: pi-marionette-runner, Whiteboard: [lang=py][good first bug] )

Attachments

(1 file)

There's a property called "capabilities" in BaseMarionetteTestRunner. 
https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette/runner/base.py#642

However, in many places in BaseMarionetteTestRunner the underlying "hidden" attribute "self._capabilities" is used, thus not taking advantage of the property. For example:

if self._capabilities['device'] == "desktop":

should be

if self.capabilities['device'] == 'desktop'
Fixed. Only 2 places were found
Comment on attachment 8730981 [details]
MozReview Request: Bug 1256978. Use self.capabilities instead of self._capabilities in BaseMarionetteTestRunner; r?maja_zf

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40293/diff/1-2/
Attachment #8730981 - Attachment description: MozReview Request: Bug 1256978. Use self.capabilities instead of self._capabilities in BaseMarionetteTestRunner → MozReview Request: Bug 1256978. Use self.capabilities instead of self._capabilities in BaseMarionetteTestRunner; r?maja_zf
Attachment #8730981 - Flags: review?(mjzffr)
Comment on attachment 8730981 [details]
MozReview Request: Bug 1256978. Use self.capabilities instead of self._capabilities in BaseMarionetteTestRunner; r?maja_zf

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40293/diff/2-3/
Assignee: nobody → nathalier
Attachment #8730981 - Flags: review?(mjzffr) → review+
Comment on attachment 8730981 [details]
MozReview Request: Bug 1256978. Use self.capabilities instead of self._capabilities in BaseMarionetteTestRunner; r?maja_zf

https://reviewboard.mozilla.org/r/40293/#review37199
https://reviewboard.mozilla.org/r/40293/#review37199

Thanks for the quick fix, Nathalie. This looks good. I'll wait until tomorrow to see how test results turn out on try, although they look good so far, and then I'll land the commit for you on mozilla-inbound.
https://hg.mozilla.org/mozilla-central/rev/5a19d947e016
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.