Bug 1316851 - Firefox UI harness has to use super() to call base class methods. r=maja_zf
authorHenrik Skupin <mail@hskupin.info>
Fri, 11 Nov 2016 13:51:08 +0100
changeset 352236 ad8f42a8e7f6948b18c534d811b270ddcea7108c
parent 352235 cd498d1a4490af65635702ff248cae18a87a4320
child 352237 608cebbca5c485f93e6f50c812c0a36b22cdf5cb
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1316851
milestone52.0a1
Bug 1316851 - Firefox UI harness has to use super() to call base class methods. r=maja_zf MozReview-Commit-ID: DfuziDqwOhX
testing/firefox-ui/harness/firefox_ui_harness/arguments/base.py
testing/firefox-ui/harness/firefox_ui_harness/arguments/update.py
testing/firefox-ui/harness/firefox_ui_harness/runners/base.py
testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/arguments/base.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/arguments/base.py
@@ -8,11 +8,11 @@ from marionette import BaseMarionetteArg
 class FirefoxUIBaseArguments(object):
     name = 'Firefox UI Tests'
     args = []
 
 
 class FirefoxUIArguments(BaseMarionetteArguments):
 
     def __init__(self, **kwargs):
-        BaseMarionetteArguments.__init__(self, **kwargs)
+        super(FirefoxUIArguments, self).__init__(**kwargs)
 
         self.register_argument_container(FirefoxUIBaseArguments())
--- a/testing/firefox-ui/harness/firefox_ui_harness/arguments/update.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/arguments/update.py
@@ -53,12 +53,13 @@ class UpdateBaseArguments(object):
 
     def verify_usage_handler(self, args):
         if args.update_direct_only and args.update_fallback_only:
             raise ValueError('Arguments --update-direct-only and --update-fallback-only '
                              'are mutually exclusive.')
 
 
 class UpdateArguments(FirefoxUIArguments):
+
     def __init__(self, **kwargs):
-        FirefoxUIArguments.__init__(self, **kwargs)
+        super(UpdateArguments, self).__init__(**kwargs)
 
         self.register_argument_container(UpdateBaseArguments())
--- a/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py
@@ -9,18 +9,20 @@ import tempfile
 import mozfile
 import mozinfo
 from marionette import BaseMarionetteTestRunner
 
 from firefox_ui_harness.testcases import FirefoxTestCase
 
 
 class FirefoxUITestRunner(BaseMarionetteTestRunner):
+
     def __init__(self, **kwargs):
-        BaseMarionetteTestRunner.__init__(self, **kwargs)
+        super(FirefoxUITestRunner, self).__init__(**kwargs)
+
         # select the appropriate GeckoInstance
         self.app = 'fxdesktop'
 
         self.test_handlers = [FirefoxTestCase]
 
     def duplicate_application(self, application_folder):
         """Creates a copy of the specified binary."""
 
--- a/testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
@@ -15,17 +15,17 @@ DEFAULT_PREFS = {
     'app.update.log': True,
     'startup.homepage_override_url': 'about:blank',
 }
 
 
 class UpdateTestRunner(FirefoxUITestRunner):
 
     def __init__(self, **kwargs):
-        FirefoxUITestRunner.__init__(self, **kwargs)
+        super(UpdateTestRunner, self).__init__(**kwargs)
 
         self.original_bin = self.bin
 
         self.prefs.update(DEFAULT_PREFS)
 
         # In case of overriding the update URL, set the appropriate preference
         override_url = kwargs.pop('update_override_url', None)
         if override_url:
@@ -52,17 +52,17 @@ class UpdateTestRunner(FirefoxUITestRunn
             try:
                 # Backup current tags
                 test_tags = self.test_tags
 
                 application_folder = self.duplicate_application(source_folder)
                 self.bin = mozinstall.get_binary(application_folder, 'Firefox')
 
                 self.test_tags = tags
-                FirefoxUITestRunner.run_tests(self, tests)
+                super(UpdateTestRunner, self).run_tests(tests)
 
             except Exception:
                 self.exc_info = sys.exc_info()
                 self.logger.error('Failure during execution of the update test.',
                                   exc_info=self.exc_info)
 
             finally:
                 self.test_tags = test_tags