Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions tests/aignostics/qupath/gui_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from tests.constants_test import (
HETA_APPLICATION_ID,
HETA_APPLICATION_VERSION,
SPOT_0_EXPECTED_CELLS_CLASSIFIED,
SPOT_0_EXPECTED_RESULT_FILES,
SPOT_0_FILENAME,
SPOT_0_FILESIZE,
Expand Down Expand Up @@ -300,7 +299,7 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091
output = normalize_output(result.output, strip_ansi=True)
print(repr(output))

# Check for (1) spot added to QuPath project, (2) heatmaps added, (3) spot annotated
# Check for (1) spot added to QuPath project, (2) heatmaps added
try:
project_info = json.loads(output)
spot_found = False
Expand All @@ -313,8 +312,6 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091
spot_found = True
spot_width = image.get("width")
spot_height = image.get("height")
hierarchy = image.get("hierarchy", {})
spot_annotations = hierarchy.get("total", 0)
if image.get("name") == "tissue_qc_segmentation_map_image.tiff":
qc_segmentation_map_found = True
if image.get("name") == "tissue_segmentation_segmentation_map_image.tiff":
Expand All @@ -324,13 +321,6 @@ async def test_gui_run_qupath_install_to_inspect( # noqa: C901, PLR0912, PLR091
assert spot_height == SPOT_0_HEIGHT, f"Expected height of spot {SPOT_0_HEIGHT}, but got {spot_height}"
assert qc_segmentation_map_found, "QC segmentation map image not found in QuPath project"
assert tissue_segmentation_map_found, "Tissue segmentation map image not found in QuPath project"
assert abs(spot_annotations - SPOT_0_EXPECTED_CELLS_CLASSIFIED[0]) <= (
SPOT_0_EXPECTED_CELLS_CLASSIFIED[0] * SPOT_0_EXPECTED_CELLS_CLASSIFIED[1] // 100
), (
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 {spot_annotations}"
)
except json.JSONDecodeError as e:
pytest.fail(f"Failed to parse QuPath inspect output as JSON: {e}\nOutput: {output!r}\n")

Expand Down
2 changes: 0 additions & 2 deletions tests/constants_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
("tumor_cellularity_parquet_polygons.parquet", 4106, 10),
("readout_generation_readouts_bundle.zip", 632626, 10),
]
SPOT_0_EXPECTED_CELLS_CLASSIFIED = (11447, 10)

SPOT_1_EXPECTED_RESULT_FILES = [
("tissue_qc_geojson_polygons.json", 25621, 10),
Expand Down Expand Up @@ -141,7 +140,6 @@

# If staging outputs differ from the defaults above, override them here, e.g.:
# SPOT_0_EXPECTED_RESULT_FILES = [("tissue_qc_segmentation_map_image.tiff", <bytes>, 10), ...]
# SPOT_0_EXPECTED_CELLS_CLASSIFIED = (<count>, 10)
# SPOT_1_EXPECTED_RESULT_FILES = [("tissue_qc_segmentation_map_image.tiff", <bytes>, 10), ...]

case _:
Expand Down
Loading