rename stuff
This commit is contained in:
parent
8172f685de
commit
d98de31d35
1 changed files with 6 additions and 6 deletions
|
|
@ -35,26 +35,26 @@ class Runner:
|
||||||
|
|
||||||
def _run_main_setup_and_test(self):
|
def _run_main_setup_and_test(self):
|
||||||
if isinstance(self.main_setup_name, str):
|
if isinstance(self.main_setup_name, str):
|
||||||
self._run_test_if_required(
|
self._run_or_skip_test(
|
||||||
identifier_string=self.combine_names(self.name, self.main_setup_name),
|
identifier_string=self.combine_names(self.name, self.main_setup_name),
|
||||||
test_path=self.root_dir / self.test_dir_name / self.main_setup_name,
|
test_path=self.root_dir / self.test_dir_name / self.main_setup_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(self.main_test_name, str):
|
if isinstance(self.main_test_name, str):
|
||||||
self._run_test_if_required(
|
self._run_or_skip_test(
|
||||||
identifier_string=self.combine_names(self.name, self.main_test_name),
|
identifier_string=self.combine_names(self.name, self.main_test_name),
|
||||||
test_path=self.root_dir / self.test_dir_name / self.main_test_name,
|
test_path=self.root_dir / self.test_dir_name / self.main_test_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _run_test_if_required(self, identifier_string: str, test_path: Path):
|
def _run_or_skip_test(self, identifier_string: str, test_path: Path):
|
||||||
if not self.prevent_skip and self._test_already_passed(identifier_string, remove_existing=True):
|
if not self.prevent_skip and self._is_test_passed(identifier_string, remove_existing=True):
|
||||||
logger.info(f"skipping {identifier_string}")
|
logger.info(f"skipping {identifier_string}")
|
||||||
else:
|
else:
|
||||||
logger.info(f"running {identifier_string}")
|
logger.info(f"running {identifier_string}")
|
||||||
result = self._call_pytest(test_path)
|
result = self._call_pytest(test_path)
|
||||||
self._create_result_file(result=result, identifier_string=identifier_string)
|
self._create_result_file(result=result, identifier_string=identifier_string)
|
||||||
|
|
||||||
def _test_already_passed(self, identifier_string: str, remove_existing: bool = False) -> bool:
|
def _is_test_passed(self, identifier_string: str, remove_existing: bool = False) -> bool:
|
||||||
"""returns True if the selected test (matching test_name + sub_test_name) already passed
|
"""returns True if the selected test (matching test_name + sub_test_name) already passed
|
||||||
|
|
||||||
This is determined by the presence of a specific output file in the RESULTS folder that
|
This is determined by the presence of a specific output file in the RESULTS folder that
|
||||||
|
|
@ -125,7 +125,7 @@ class Runner:
|
||||||
identifier_string = self.combine_names(self.name, sub_test_name)
|
identifier_string = self.combine_names(self.name, sub_test_name)
|
||||||
if condition_function(self.config):
|
if condition_function(self.config):
|
||||||
test_path = self.root_dir / self.test_dir_name / sub_test_name
|
test_path = self.root_dir / self.test_dir_name / sub_test_name
|
||||||
self._run_test_if_required(identifier_string=identifier_string, test_path=test_path)
|
self._run_or_skip_test(identifier_string=identifier_string, test_path=test_path)
|
||||||
else:
|
else:
|
||||||
self._create_result_file(result=-1, identifier_string=identifier_string)
|
self._create_result_file(result=-1, identifier_string=identifier_string)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue