Skip to content

Commit d53a64f

Browse files
committed
tests: Delete core files for successful tests
By default pytest keeps temp files for the last 3 runs of the test suite around, but this can quickly fill up a disk due to the number of core files we create. Configure it to only keep temp files for failed tests. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
1 parent 3cbf443 commit d53a64f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,8 @@ omit = [
116116

117117
[tool.coverage.report]
118118
show_missing = true
119+
120+
[tool.pytest.ini_options]
121+
# pytest retains all temp files from the last 3 test suite runs by default.
122+
# Keep only ones for failed tests to avoid filling up a disk.
123+
tmp_path_retention_policy = "failed"

0 commit comments

Comments
 (0)