Merge branch 'tests-extra-fix'
This commit is contained in:
commit
d0f619d3c6
@ -211,11 +211,11 @@ def load_tests(loader, tests, pattern):
|
|||||||
if entry.name in exclude_list:
|
if entry.name in exclude_list:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
for test_case in entry.load()():
|
for test_case in entry.resolve()():
|
||||||
tests.addTests(loader.loadTestsFromNames([
|
tests.addTests(loader.loadTestsFromNames([
|
||||||
'{}.{}'.format(test_case.__module__, test_case.__name__)]))
|
'{}.{}'.format(test_case.__module__, test_case.__name__)]))
|
||||||
except Exception as err: # pylint: disable=broad-except
|
except Exception as err: # pylint: disable=broad-except
|
||||||
def runTest(self):
|
def runTest(self, err=err):
|
||||||
raise err
|
raise err
|
||||||
ExtraLoadFailure = type('ExtraLoadFailure',
|
ExtraLoadFailure = type('ExtraLoadFailure',
|
||||||
(qubes.tests.QubesTestCase,),
|
(qubes.tests.QubesTestCase,),
|
||||||
@ -229,13 +229,13 @@ def load_tests(loader, tests, pattern):
|
|||||||
if entry.name in exclude_list:
|
if entry.name in exclude_list:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
for test_case in entry.load()():
|
for test_case in entry.resolve()():
|
||||||
tests.addTests(loader.loadTestsFromNames(
|
tests.addTests(loader.loadTestsFromNames(
|
||||||
qubes.tests.create_testcases_for_templates(
|
qubes.tests.create_testcases_for_templates(
|
||||||
test_case.__name__, test_case,
|
test_case.__name__, test_case,
|
||||||
module=sys.modules[test_case.__module__])))
|
module=sys.modules[test_case.__module__])))
|
||||||
except Exception as err: # pylint: disable=broad-except
|
except Exception as err: # pylint: disable=broad-except
|
||||||
def runTest(self):
|
def runTest(self, err=err):
|
||||||
raise err
|
raise err
|
||||||
ExtraForTemplateLoadFailure = type('ExtraForTemplateLoadFailure',
|
ExtraForTemplateLoadFailure = type('ExtraForTemplateLoadFailure',
|
||||||
(qubes.tests.QubesTestCase,),
|
(qubes.tests.QubesTestCase,),
|
||||||
|
Loading…
Reference in New Issue
Block a user