Skip to content

Commit 9ce56d5

Browse files
committed
catch yet one more crash..
1 parent 9d1b9ec commit 9ce56d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

codeflash/verification/parse_test_output.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,19 @@ def parse_sqlite_test_results(sqlite_file_path: Path, test_files: TestFiles, tes
107107
logger.warning(f"No test results for {sqlite_file_path} found.")
108108
console.rule()
109109
return test_results
110+
db = None
110111
try:
111112
db = sqlite3.connect(sqlite_file_path)
112113
cur = db.cursor()
113114
data = cur.execute(
114115
"SELECT test_module_path, test_class_name, test_function_name, "
115116
"function_getting_tested, loop_index, iteration_id, runtime, return_value,verification_type FROM test_results"
116117
).fetchall()
118+
except Exception as e:
119+
logger.warning(f"Failed to parse test results from {sqlite_file_path}. Exception: {e}")
120+
if db is not None:
121+
db.close()
122+
return test_results
117123
finally:
118124
db.close()
119125
for val in data:

0 commit comments

Comments
 (0)