From 65e4d0b466a1dd2faab959c2e6cdd8a123a44a56 Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Sun, 28 Jun 2020 07:02:46 -0400 Subject: [PATCH] Disable caching of test results --- testr/runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testr/runner.py b/testr/runner.py index e7702cf..0c4c0bb 100644 --- a/testr/runner.py +++ b/testr/runner.py @@ -115,6 +115,10 @@ def chdir(dirname=None): args += (f'--junit-xml={report_file}',) args += ('-o', 'junit_family=xunit2') + # Disable caching of test results to prevent users trying to write into + # flight directory if tests fail running on installed package. + args = args + ('-p', 'no:cacheprovider') + stack_level = kwargs.pop('stack_level', 1) calling_frame_record = inspect.stack()[stack_level] # Only works for stack-based Python calling_func_file = calling_frame_record[1]