make dirmanager support str

This commit is contained in:
Daniel 2023-11-24 18:09:00 +01:00
parent 76a79c11b2
commit 21105a001b

View file

@ -16,8 +16,10 @@ class DirManager:
...
"""
def __init__(self, tests_dir: Path, session_id: str):
def __init__(self, tests_dir: Path | str, session_id: str):
# root test dir
if isinstance(tests_dir, str):
tests_dir = Path(tests_dir)
self._tests_dir = tests_dir.resolve()
self.session_id = session_id