small dir improvements

This commit is contained in:
Daniel 2023-11-30 19:21:46 +01:00
parent a8b4302805
commit cd824c2bf2
2 changed files with 5 additions and 4 deletions

View file

@ -30,12 +30,12 @@ class DirManager:
)
@property
def OUTPUT(self):
def OUTPUT_DIR(self):
return self._output_dir
@property
def SESSION(self):
return self._output_dir / f"test-{self.session_id}"
return self.OUTPUT_DIR / f"test-{self.session_id}"
@property
def RECORDS(self):

View file

@ -117,13 +117,14 @@ class Runner:
command_arguments.append("--env_file")
command_arguments.append(str(self.dotenv_path))
# set root dir for tests output (used in DirManager). this is our custom argument
command_arguments.append("--output_dir")
command_arguments.append(str(self.DIRS.OUTPUT))
command_arguments.append(str(self.DIRS.OUTPUT_DIR))
command_arguments.append("--session_id")
command_arguments.append(self.session_id)
# artifacts dir
# artifacts dir from pytest
# warning: https://github.com/microsoft/playwright-pytest/issues/111
# --output only works with the given context and page fixture
# folder needs to be unique! traces will not appear, if every pytest run has same output dir