From 14afcff880ccb42dc01c9d3517a31eb16b6b8b59 Mon Sep 17 00:00:00 2001 From: Eric Huang Date: Fri, 7 Mar 2025 13:44:12 -0800 Subject: [PATCH] test: fix recordable mocks cache key Summary: Test Plan: --- tests/integration/fixtures/recordable_mock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/fixtures/recordable_mock.py b/tests/integration/fixtures/recordable_mock.py index d71426336..632d5b3ef 100644 --- a/tests/integration/fixtures/recordable_mock.py +++ b/tests/integration/fixtures/recordable_mock.py @@ -121,6 +121,9 @@ class RecordableMock: # Replace temporary file paths created by tempfile.mkdtemp() key = re.sub(r"/var/folders/[^,'\"\s]+", "", key) + # Replace /tmp/ paths which are also commonly used for temporary files + key = re.sub(r"/tmp/[^,'\"\s]+", "", key) + return key def _save_cache(self):