diff --git a/pytest_jsonreport/plugin.py b/pytest_jsonreport/plugin.py index 6ee4ea5..f81c9f9 100644 --- a/pytest_jsonreport/plugin.py +++ b/pytest_jsonreport/plugin.py @@ -244,6 +244,7 @@ def pytest_sessionfinish(self, session): self.report = json_report path = self._config.option.json_report_file if path: + path = os.path.expanduser(os.path.expandvars(path)) try: self.save_report(path) except OSError as e: