diff --git a/conftest.py b/conftest.py index 7a345454..45b9ddd7 100644 --- a/conftest.py +++ b/conftest.py @@ -43,9 +43,7 @@ def ij(request): legacy = request.config.getoption("--legacy") headless = request.config.getoption("--headless") - imagej.when_imagej_starts( - lambda ij: setattr(ij, "_when_imagej_starts_result", "success") - ) + imagej.when_imagej_starts(lambda ij: setattr(ij, "_testing", True)) mode = "headless" if headless else "interactive" ij = imagej.init(ij_dir, mode=mode, add_legacy=legacy) diff --git a/tests/test_callbacks.py b/tests/test_callbacks.py index 9e3f5ab5..f05f5d45 100644 --- a/tests/test_callbacks.py +++ b/tests/test_callbacks.py @@ -4,4 +4,4 @@ def test_when_imagej_starts(ij): when_imagej_starts, which injects a small piece of data into the gateway object. We check for that data here to make sure the callback happened. """ - assert "success" == getattr(ij, "_when_imagej_starts_result", None) + assert True == getattr(ij, "_testing", True)