From 4653a982390ee6909fb8318b032ea1562999d292 Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Fri, 16 Aug 2024 23:31:36 -0400 Subject: [PATCH] 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 --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fda17ed6..84f6a0dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,3 +116,8 @@ omit = [ [tool.coverage.report] show_missing = true + +[tool.pytest.ini_options] +# pytest retains all temp files from the last 3 test suite runs by default. +# Keep only ones for failed tests to avoid filling up a disk. +tmp_path_retention_policy = "failed"