Skip to content

Commit 4971e95

Browse files
author
Matic Lubej
committed
fail tests even if save-new-stats is set to true
1 parent f4ed2b3 commit 4971e95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eogrow/utils/testing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ def compare_content(
368368
raise ValueError("The given path is None. The pipeline likely has no `output_folder_key` parameter.")
369369
config = StatCalcConfig() if config is None else config
370370
stats = calculate_statistics(folder_path, config=config)
371+
stats_difference = compare_with_saved(stats, stats_path)
371372

372373
if save_new_stats:
373374
save_statistics(stats, stats_path)
374375

375-
stats_difference = compare_with_saved(stats, stats_path)
376376
if stats_difference:
377377
stats_difference_repr = stats_difference.to_json(indent=2, sort_keys=True)
378378
raise AssertionError(f"Expected and obtained stats differ:\n{stats_difference_repr}")

0 commit comments

Comments
 (0)