Skip to content

Commit 6bd39f7

Browse files
committed
fix cov method
1 parent 1fe7bd1 commit 6bd39f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codeflash/verification/coverage_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def load_from_sqlite_database(
3838

3939
cov = Coverage(data_file=database_path, config_file=config_path, data_suffix=True, auto_data=True, branch=True)
4040

41-
if not database_path.stat().st_size or not database_path.exists():
41+
if not database_path.exists() or not database_path.stat().st_size:
4242
logger.debug(f"Coverage database {database_path} is empty or does not exist")
4343
sentry_sdk.capture_message(f"Coverage database {database_path} is empty or does not exist")
44-
return CoverageUtils.create_empty(source_code_path, function_name, code_context)
44+
return CoverageData.create_empty(source_code_path, function_name, code_context)
4545
cov.load()
4646

4747
reporter = JsonReporter(cov)
@@ -51,7 +51,7 @@ def load_from_sqlite_database(
5151
reporter.report(morfs=[source_code_path.as_posix()], outfile=f)
5252
except NoDataError:
5353
sentry_sdk.capture_message(f"No coverage data found for {function_name} in {source_code_path}")
54-
return CoverageUtils.create_empty(source_code_path, function_name, code_context)
54+
return CoverageData.create_empty(source_code_path, function_name, code_context)
5555
with temp_json_file.open() as f:
5656
original_coverage_data = json.load(f)
5757

0 commit comments

Comments
 (0)