Bug 1316851 - Firefox UI harness has to use super() to call base class methods. draft
authorHenrik Skupin <mail@hskupin.info>
Fri, 11 Nov 2016 13:51:08 +0100
changeset 437703 cd7af0c87a5706753c618fcedceb8b6c4037a954
parent 437702 083b5801b7ee0b4b97050e06295d22ddf7dd715c
child 437704 721cc1b4ff1c9d40c4e222f5d47190a6a9726312
push id35493
push userbmo:hskupin@gmail.com
push dateFri, 11 Nov 2016 14:05:42 +0000
bugs1316851
milestone52.0a1
Bug 1316851 - Firefox UI harness has to use super() to call base class methods. 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