launcher: Cleanup the way we find python test command line

By setting it before the test base class adds the current testsuite name in the classname
This commit is contained in:
Thibault Saunier 2019-01-25 22:06:14 -03:00 committed by Thibault Saunier
parent 9cf213dee0
commit 3f4f815500

View file

@ -26,9 +26,13 @@ from launcher.baseclasses import TestsManager
class PythonTest(Test):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._testname = self.classname
def build_arguments(self):
"""Builds subprocess arguments."""
self.add_arguments('-m', 'unittest', '.'.join(self.classname.split('.')[1:]))
self.add_arguments('-m', 'unittest', self._testname)
class PythonTestsManager(TestsManager):