We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36f5930 commit 66e54c8Copy full SHA for 66e54c8
1 file changed
src/pytest_codspeed/plugin.py
@@ -310,7 +310,10 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus):
310
session.config.rootpath / f".codspeed/results_{time() * 1000:.0f}.json"
311
)
312
data = {**get_environment_metadata(), **plugin.instrument.get_result_dict()}
313
+ created = not result_path.parent.exists()
314
result_path.parent.mkdir(parents=True, exist_ok=True)
315
+ if created:
316
+ (result_path.parent / ".gitignore").write_text("*\n")
317
result_path.write_text(json.dumps(data, indent=2))
318
319
0 commit comments