From db5c570bc636afe3a231d3e17d3b6a0c3f835ce4 Mon Sep 17 00:00:00 2001 From: Blanca Pablos Date: Fri, 6 Mar 2026 10:48:59 +0100 Subject: [PATCH] fix(test): Fix expected results after version bump --- tests/aignostics/qupath/gui_test.py | 3 +-- tests/constants_test.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/aignostics/qupath/gui_test.py b/tests/aignostics/qupath/gui_test.py index 1814d2801..01d9a1b6d 100644 --- a/tests/aignostics/qupath/gui_test.py +++ b/tests/aignostics/qupath/gui_test.py @@ -302,7 +302,6 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091 # Check for (1) spot added to QuPath project, (2) heatmaps added, (3) spot annotated try: project_info = json.loads(output) - annotations_total = 0 spot_found = False spot_width = None spot_height = None @@ -329,7 +328,7 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091 ), ( f"Expected approximately {SPOT_0_EXPECTED_CELLS_CLASSIFIED[0]} " f"({SPOT_0_EXPECTED_CELLS_CLASSIFIED[1]}% tolerance) annotations in the QuPath results, " - f"but found {annotations_total}" + f"but found {spot_annotations}" ) except json.JSONDecodeError as e: pytest.fail(f"Failed to parse QuPath inspect output as JSON: {e}\nOutput: {output!r}\n") diff --git a/tests/constants_test.py b/tests/constants_test.py index 157515739..7da8acae5 100644 --- a/tests/constants_test.py +++ b/tests/constants_test.py @@ -112,17 +112,17 @@ SPECIAL_APPLICATION_VERSION = "0.99.0" SPOT_0_EXPECTED_RESULT_FILES = [ - ("tissue_qc_segmentation_map_image.tiff", 1540764, 10), - ("tissue_qc_geojson_polygons.json", 160668, 10), - ("tissue_segmentation_geojson_polygons.json", 853784, 10), - ("readout_generation_slide_readouts.csv", 302252, 10), - ("readout_generation_cell_readouts.csv", 1472661, 10), - ("cell_classification_geojson_polygons.json", 9939791, 10), - ("tissue_segmentation_segmentation_map_image.tiff", 2807584, 10), - ("tissue_segmentation_csv_class_information.csv", 451, 10), - ("tissue_qc_csv_class_information.csv", 284, 10), + ("tissue_qc_segmentation_map_image.tiff", 1642856, 10), + ("tissue_qc_geojson_polygons.json", 259955, 10), + ("tissue_segmentation_geojson_polygons.json", 887003, 10), + ("readout_generation_slide_readouts.csv", 303217, 10), + ("readout_generation_cell_readouts.csv", 1658344, 10), + ("cell_classification_geojson_polygons.json", 11218951, 10), + ("tissue_segmentation_segmentation_map_image.tiff", 2945078, 10), + ("tissue_segmentation_csv_class_information.csv", 452, 10), + ("tissue_qc_csv_class_information.csv", 285, 10), ] - SPOT_0_EXPECTED_CELLS_CLASSIFIED = (35160, 10) + SPOT_0_EXPECTED_CELLS_CLASSIFIED = (39798, 10) SPOT_1_EXPECTED_RESULT_FILES = [ ("tissue_qc_segmentation_map_image.tiff", 469040, 10),