From 9f59d1588b46b2613eb1d997f8da769350b54450 Mon Sep 17 00:00:00 2001 From: Aseem Saxena Date: Tue, 7 Oct 2025 16:16:56 -0700 Subject: [PATCH] fix pytest_rootdir being set to None when pkl is not available --- codeflash/discovery/discover_unit_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/codeflash/discovery/discover_unit_tests.py b/codeflash/discovery/discover_unit_tests.py index 288763926..81ffdfa44 100644 --- a/codeflash/discovery/discover_unit_tests.py +++ b/codeflash/discovery/discover_unit_tests.py @@ -417,6 +417,7 @@ def discover_tests_pytest( with tmp_pickle_path.open(mode="rb") as f: exitcode, tests, pytest_rootdir = pickle.load(f) except Exception as e: + tests, pytest_rootdir = [], None logger.exception(f"Failed to discover tests: {e}") exitcode = -1 finally: