various #16

Merged
dan merged 94 commits from various into dev 2023-12-14 14:04:01 +01:00
Showing only changes of commit 131477557d - Show all commits

View file

@ -114,7 +114,8 @@ class Runner:
status = cls.exit_code_to_str(status)
# remove matching files
[f.unlink() for f in DIR.STATUS.glob("*") if identifier_string in f.name]
for status_file in cls._get_status_files(DIR, identifier_string):
status_file.unlink()
full_name = cls.combine_names(status, identifier_string)
file_path = DIR.STATUS / full_name
@ -122,10 +123,14 @@ class Runner:
pass # create empty file
@staticmethod
def _is_test_passed(DIR: "DirManager", identifier_string: str) -> bool:
def _get_status_files(DIR: "DirManager", identifier_string: str) -> list[Path]:
return [f for f in DIR.STATUS.glob("*") if identifier_string in f.name]
@classmethod
def _is_test_passed(cls, DIR: "DirManager", identifier_string: str) -> bool:
"""returns True if the selected test matching identifier_string already passed"""
matching_files = [f for f in DIR.STATUS.glob("*") if identifier_string in f.name]
matching_files = cls._get_status_files(DIR, identifier_string)
if len(matching_files) == 1:
status_file = matching_files[0]
if "passed" in status_file.name: