From d73bc478f216eb6ce31dd8e13bc6a3775f367b43 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Thu, 8 Feb 2024 17:54:56 +0000 Subject: [PATCH] Fixed macOS tests for real --- tests/test_unit/test_big_stitcher_bridge.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_unit/test_big_stitcher_bridge.py b/tests/test_unit/test_big_stitcher_bridge.py index 219e9f5..a7d8bac 100644 --- a/tests/test_unit/test_big_stitcher_bridge.py +++ b/tests/test_unit/test_big_stitcher_bridge.py @@ -10,7 +10,10 @@ XML_PATH_WINDOWS = Path("C:/stitching/Brain2/bdv.xml") TILE_CONFIG_PATH_WINDOWS = Path("C:/stitching/Brain2/bdv_tile_config.txt") -IMAGEJ_PATH_MAC = Path("/Users/user/Fiji.app/Contents/MacOS/ImageJ-macosx") +IMAGEJ_PATH_MAC = Path("/Users/user/Fiji.app") +IMAGEJ_PATH_MAC_CHECK = Path( + "/Users/user/Fiji.app/Fiji.app/Contents/MacOS/ImageJ-macosx" +) XML_PATH_MAC = Path("/Users/user/stitching/Brain2/bdv.xml") TILE_CONFIG_PATH_MAC = Path("/Users/user/stitching/Brain2/bdv_tile_config.txt") @@ -33,6 +36,9 @@ def test_run_big_stitcher_defaults(mocker): macro_path = files("brainglobe_stitch").joinpath("bigstitcher_macro.ijm") + if platform.startswith("darwin"): + imagej_path = IMAGEJ_PATH_MAC_CHECK + command = ( f"{imagej_path} --ij2" f" --headless -macro {macro_path} " @@ -87,6 +93,9 @@ def test_run_big_stitcher( macro_path = files("brainglobe_stitch").joinpath("bigstitcher_macro.ijm") + if platform.startswith("darwin"): + imagej_path = IMAGEJ_PATH_MAC_CHECK + command = ( f"{imagej_path} --ij2" f" --headless -macro {macro_path} "