Skip to content

Commit da606b8

Browse files
committed
fix(test): Fix expected results after version bump
1 parent 0414a3c commit da606b8

2 files changed

Lines changed: 19 additions & 24 deletions

File tree

tests/aignostics/qupath/gui_test.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@
1818
from aignostics.cli import cli
1919
from aignostics.qupath import QUPATH_LAUNCH_MAX_WAIT_TIME, QUPATH_VERSION
2020
from aignostics.utils import __project_name__
21-
from tests.conftest import assert_notified, normalize_output, print_directory_structure
22-
from tests.constants_test import (
23-
HETA_APPLICATION_ID,
24-
HETA_APPLICATION_VERSION,
25-
SPOT_0_EXPECTED_CELLS_CLASSIFIED,
26-
SPOT_0_EXPECTED_RESULT_FILES,
27-
SPOT_0_FILENAME,
28-
SPOT_0_FILESIZE,
29-
SPOT_0_GS_URL,
30-
SPOT_0_HEIGHT,
31-
SPOT_0_WIDTH,
32-
)
21+
from tests.conftest import (assert_notified, normalize_output,
22+
print_directory_structure)
23+
from tests.constants_test import (HETA_APPLICATION_ID,
24+
HETA_APPLICATION_VERSION,
25+
SPOT_0_EXPECTED_CELLS_CLASSIFIED,
26+
SPOT_0_EXPECTED_RESULT_FILES,
27+
SPOT_0_FILENAME, SPOT_0_FILESIZE,
28+
SPOT_0_GS_URL, SPOT_0_HEIGHT, SPOT_0_WIDTH)
3329

3430
if TYPE_CHECKING:
3531
from nicegui import ui
@@ -302,7 +298,6 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091
302298
# Check for (1) spot added to QuPath project, (2) heatmaps added, (3) spot annotated
303299
try:
304300
project_info = json.loads(output)
305-
annotations_total = 0
306301
spot_found = False
307302
spot_width = None
308303
spot_height = None
@@ -329,7 +324,7 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091
329324
), (
330325
f"Expected approximately {SPOT_0_EXPECTED_CELLS_CLASSIFIED[0]} "
331326
f"({SPOT_0_EXPECTED_CELLS_CLASSIFIED[1]}% tolerance) annotations in the QuPath results, "
332-
f"but found {annotations_total}"
327+
f"but found {spot_annotations}"
333328
)
334329
except json.JSONDecodeError as e:
335330
pytest.fail(f"Failed to parse QuPath inspect output as JSON: {e}\nOutput: {output!r}\n")

tests/constants_test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@
112112
SPECIAL_APPLICATION_VERSION = "0.99.0"
113113

114114
SPOT_0_EXPECTED_RESULT_FILES = [
115-
("tissue_qc_segmentation_map_image.tiff", 1540764, 10),
116-
("tissue_qc_geojson_polygons.json", 160668, 10),
117-
("tissue_segmentation_geojson_polygons.json", 853784, 10),
118-
("readout_generation_slide_readouts.csv", 302252, 10),
119-
("readout_generation_cell_readouts.csv", 1472661, 10),
120-
("cell_classification_geojson_polygons.json", 9939791, 10),
121-
("tissue_segmentation_segmentation_map_image.tiff", 2807584, 10),
122-
("tissue_segmentation_csv_class_information.csv", 451, 10),
123-
("tissue_qc_csv_class_information.csv", 284, 10),
115+
("tissue_qc_segmentation_map_image.tiff", 1642856, 10),
116+
("tissue_qc_geojson_polygons.json", 259955, 10),
117+
("tissue_segmentation_geojson_polygons.json", 887003, 10),
118+
("readout_generation_slide_readouts.csv", 303217, 10),
119+
("readout_generation_cell_readouts.csv", 1658344, 10),
120+
("cell_classification_geojson_polygons.json", 11218951, 10),
121+
("tissue_segmentation_segmentation_map_image.tiff", 2945078, 10),
122+
("tissue_segmentation_csv_class_information.csv", 452, 10),
123+
("tissue_qc_csv_class_information.csv", 285, 10),
124124
]
125-
SPOT_0_EXPECTED_CELLS_CLASSIFIED = (35160, 10)
125+
SPOT_0_EXPECTED_CELLS_CLASSIFIED = (39798, 10)
126126

127127
SPOT_1_EXPECTED_RESULT_FILES = [
128128
("tissue_qc_segmentation_map_image.tiff", 469040, 10),

0 commit comments

Comments
 (0)