put progress files in PROGRESS dir
This commit is contained in:
parent
2ec7c6fd30
commit
851c06f795
1 changed files with 8 additions and 6 deletions
|
|
@ -83,7 +83,7 @@ class Runner:
|
|||
pytest.main(command_arguments)
|
||||
|
||||
def run_tests(self):
|
||||
self._check_dependencies()
|
||||
self._check_dependencies_finished()
|
||||
self._run_main_test()
|
||||
for sub_test in self.sub_tests:
|
||||
condition_function = sub_test["condition"]
|
||||
|
|
@ -91,14 +91,16 @@ class Runner:
|
|||
test_name = sub_test["test_file"]
|
||||
full_test_path = self.root_dir / self.test_dir_name / test_name
|
||||
self._run_pytest(full_test_path)
|
||||
self._create_complete_file()
|
||||
self._create_progress_file()
|
||||
|
||||
def _create_complete_file(self):
|
||||
file_path = self.DIRS.RESULTS / self.name
|
||||
def _create_progress_file(self):
|
||||
"""create progress file to indicated finished test"""
|
||||
file_path = self.DIRS.PROGRESS / self.name
|
||||
with open(file_path, "w") as _:
|
||||
pass # create empty file
|
||||
|
||||
def _check_dependencies(self):
|
||||
finished_tests = [result.name for result in self.DIRS.RESULTS.glob("*")]
|
||||
def _check_dependencies_finished(self):
|
||||
"""look for progress file of dependencies to confirm they have ran"""
|
||||
finished_tests = [result.name for result in self.DIRS.PROGRESS.glob("*")]
|
||||
for dependencie in self.dependencies:
|
||||
assert dependencie in finished_tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue