Skip to content

Commit

Permalink
tests: adjust extra tests loader to work with nose2
Browse files Browse the repository at this point in the history
Nose loader do not provide loader.loadTestsFromTestCase(), use
loader.loadTestsFromNames() instead.
  • Loading branch information
marmarek committed Oct 27, 2018
1 parent fb14f58 commit 84d3547
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qubes/tests/extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84d3547

Please sign in to comment.