tests: adjust extra tests loader to work with nose2

Nose loader do not provide loader.loadTestsFromTestCase(), use
loader.loadTestsFromNames() instead.
This commit is contained in:
Marek Marczykowski-Górecki 2018-10-27 16:21:27 +02:00
parent fb14f589cb
commit 84d3547f09
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -195,7 +195,8 @@ def load_tests(loader, tests, pattern):
for entry in pkg_resources.iter_entry_points('qubes.tests.extra'):
try:
for test_case in entry.load()():
tests.addTests(loader.loadTestsFromTestCase(test_case))
tests.addTests(loader.loadTestsFromNames([
'{}.{}'.format(test_case.__module__, test_case.__name__)]))
except Exception as err: # pylint: disable=broad-except
def runTest(self):
raise err