From 1a4bff4d2ebd1d9869e91f549f0ba5242e27d0b2 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Mon, 6 Apr 2026 12:41:27 +0100 Subject: [PATCH] Use centralized is_test_mode() from PyAutoFit Replace direct os.environ PYAUTOFIT_TEST_MODE check with the shared is_test_mode() helper for consistency across the stack. Co-Authored-By: Claude Opus 4.6 (1M context) --- autogalaxy/quantity/model/visualizer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autogalaxy/quantity/model/visualizer.py b/autogalaxy/quantity/model/visualizer.py index 32483aab..e3bfbbbd 100644 --- a/autogalaxy/quantity/model/visualizer.py +++ b/autogalaxy/quantity/model/visualizer.py @@ -1,6 +1,7 @@ import os import autofit as af +from autofit.non_linear.test_mode import is_test_mode from autogalaxy.quantity.model.plotter import PlotterQuantity @@ -65,7 +66,7 @@ def visualize( via a non-linear search). """ - if os.environ.get("PYAUTOFIT_TEST_MODE") == "1": + if is_test_mode(): return fit = analysis.fit_quantity_for_instance(instance=instance)