Skip to content

Commit e776ea2

Browse files
Jammy2211claude
authored andcommitted
Use centralized is_test_mode() from PyAutoFit
Replace direct os.environ PYAUTOFIT_TEST_MODE checks with the shared is_test_mode() helper for consistency across the stack. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d931a1c commit e776ea2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoarray/inversion/mesh/image_mesh/hilbert.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from autoarray.structures.grids.irregular_2d import Grid2DIrregular
1313

1414
from autoarray import exc
15+
from autofit.non_linear.test_mode import is_test_mode
1516

1617

1718
def gilbert2d(width, height):
@@ -330,7 +331,7 @@ def check_mesh_pixels_per_image_pixels(
330331
an exception is raised.
331332
"""
332333

333-
if os.environ.get("PYAUTOFIT_TEST_MODE") == "1":
334+
if is_test_mode():
334335
return
335336

336337
if image_mesh_min_mesh_pixels_per_pixel is not None:
@@ -397,7 +398,7 @@ def check_adapt_background_pixels(
397398
an exception is raised.
398399
"""
399400

400-
if os.environ.get("PYAUTOFIT_TEST_MODE") == "1":
401+
if is_test_mode():
401402
return
402403

403404
if image_mesh_adapt_background_percent_threshold is not None:

0 commit comments

Comments
 (0)