authentik setup and tracing #2
1 changed files with 8 additions and 6 deletions
|
|
@ -83,7 +83,7 @@ class Runner:
|
||||||
pytest.main(command_arguments)
|
pytest.main(command_arguments)
|
||||||
|
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
self._check_dependencies()
|
self._check_dependencies_finished()
|
||||||
self._run_main_test()
|
self._run_main_test()
|
||||||
for sub_test in self.sub_tests:
|
for sub_test in self.sub_tests:
|
||||||
condition_function = sub_test["condition"]
|
condition_function = sub_test["condition"]
|
||||||
|
|
@ -91,14 +91,16 @@ class Runner:
|
||||||
test_name = sub_test["test_file"]
|
test_name = sub_test["test_file"]
|
||||||
full_test_path = self.root_dir / self.test_dir_name / test_name
|
full_test_path = self.root_dir / self.test_dir_name / test_name
|
||||||
self._run_pytest(full_test_path)
|
self._run_pytest(full_test_path)
|
||||||
self._create_complete_file()
|
self._create_progress_file()
|
||||||
|
|
||||||
def _create_complete_file(self):
|
def _create_progress_file(self):
|
||||||
file_path = self.DIRS.RESULTS / self.name
|
"""create progress file to indicated finished test"""
|
||||||
|
file_path = self.DIRS.PROGRESS / self.name
|
||||||
with open(file_path, "w") as _:
|
with open(file_path, "w") as _:
|
||||||
pass # create empty file
|
pass # create empty file
|
||||||
|
|
||||||
def _check_dependencies(self):
|
def _check_dependencies_finished(self):
|
||||||
finished_tests = [result.name for result in self.DIRS.RESULTS.glob("*")]
|
"""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:
|
for dependencie in self.dependencies:
|
||||||
assert dependencie in finished_tests
|
assert dependencie in finished_tests
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue