mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879683 - Allow MarionetteTestResult and MarionetteTextTestRunner to be subclassed. r=jgriffin
This commit is contained in:
parent
6d1dd5e546
commit
139b1a2fbe
@ -6,5 +6,7 @@ from gestures import *
|
||||
from marionette import Marionette, HTMLElement, Actions, MultiActions
|
||||
from marionette_test import MarionetteTestCase, CommonTestCase
|
||||
from emulator import Emulator
|
||||
from runtests import MarionetteTestResult
|
||||
from runtests import MarionetteTestRunner
|
||||
from runtests import MarionetteTestOptions
|
||||
from runtests import MarionetteTextTestRunner
|
||||
|
@ -71,7 +71,8 @@ class MarionetteTestResult(unittest._TextTestResult):
|
||||
self.stream.writeln('END LOG:')
|
||||
|
||||
def printErrorList(self, flavour, errors):
|
||||
for test, err in errors:
|
||||
for error in errors:
|
||||
test, err = error[:2]
|
||||
self.stream.writeln(self.separator1)
|
||||
self.stream.writeln("%s: %s" % (flavour, self.getDescription(test)))
|
||||
self.stream.writeln(self.separator2)
|
||||
@ -169,6 +170,8 @@ class MarionetteTextTestRunner(unittest.TextTestRunner):
|
||||
|
||||
class MarionetteTestRunner(object):
|
||||
|
||||
textrunnerclass = MarionetteTextTestRunner
|
||||
|
||||
def __init__(self, address=None, emulator=None, emulatorBinary=None,
|
||||
emulatorImg=None, emulator_res='480x800', homedir=None,
|
||||
app=None, bin=None, profile=None, autolog=False, revision=None,
|
||||
@ -440,8 +443,8 @@ class MarionetteTestRunner(object):
|
||||
break
|
||||
|
||||
if suite.countTestCases():
|
||||
runner = MarionetteTextTestRunner(verbosity=3,
|
||||
marionette=self.marionette)
|
||||
runner = self.textrunnerclass(verbosity=3,
|
||||
marionette=self.marionette)
|
||||
results = runner.run(suite)
|
||||
self.results.append(results)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user