From 3f4f815500bdc8809a07abfbf6fbdeb4bd19fb9e Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 25 Jan 2019 22:06:14 -0300 Subject: [PATCH] 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 --- validate/launcher/apps/pyunittest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/validate/launcher/apps/pyunittest.py b/validate/launcher/apps/pyunittest.py index daeac62..08aef10 100644 --- a/validate/launcher/apps/pyunittest.py +++ b/validate/launcher/apps/pyunittest.py @@ -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): -- 2.7.4