Skip to content

Instantly share code, notes, and snippets.

@andreastt
Created November 16, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreastt/ab4da121f8c4754240d52395be6f89df to your computer and use it in GitHub Desktop.
Save andreastt/ab4da121f8c4754240d52395be6f89df to your computer and use it in GitHub Desktop.
diff --git a/testing/marionette/harness/marionette/marionette_test/testcases.py b/testing/marionette/harness/marionette/marionette_test/testcases.py
index 18d9b23..b462f24 100644
--- a/testing/marionette/harness/marionette/marionette_test/testcases.py
+++ b/testing/marionette/harness/marionette/marionette_test/testcases.py
@@ -74,8 +74,12 @@ class CommonTestCase(unittest.TestCase):
failureException = AssertionError
pydebugger = None
- def __init__(self, methodName, **kwargs):
+ def __init__(self, methodName, marionette_weakref, fixtures, **kwargs):
super(CommonTestCase, self).__init__(methodName)
+ self.methodName = methodName
+
+ self._marionette_weakref = marionette_weakref
+ self.fixtures = fixtures
self.loglines = []
self.duration = 0
@@ -422,15 +426,11 @@ class MarionetteTestCase(CommonTestCase):
def __init__(self, marionette_weakref, fixtures, methodName='runTest',
filepath='', **kwargs):
- self._marionette_weakref = marionette_weakref
- self.fixtures = fixtures
- self.methodName = methodName
self.filepath = filepath
self.testvars = kwargs.pop('testvars', None)
- self.marionette = None
-
- super(MarionetteTestCase, self).__init__(methodName, **kwargs)
+ super(MarionetteTestCase, self).__init__(
+ methodName, marionette_weakref=marionette_weakref, fixtures=fixtures, **kwargs)
@classmethod
def add_tests_to_suite(cls, mod_name, filepath, suite, testloader, marionette,
@@ -508,14 +508,13 @@ class MarionetteJSTestCase(CommonTestCase):
match_re = re.compile(r"test_(.*)\.js$")
- def __init__(self, marionette_weakref, methodName='runTest',
+ def __init__(self, marionette_weakref, fixtures, methodName='runTest',
jsFile=None, **kwargs):
assert(jsFile)
self.jsFile = jsFile
- self._marionette_weakref = marionette_weakref
- self.marionette = None
- super(MarionetteJSTestCase, self).__init__(methodName)
+ super(MarionetteJSTestCase, self).__init__(
+ methodName, marionette_weakref=marionette_weakref, fixtures=fixtures, **kwargs)
@classmethod
def add_tests_to_suite(cls, mod_name, filepath, suite, testloader, marionette,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment