Skip to content

Commit 2448ebf

Browse files
authored
Merge pull request #250 from PyAutoLabs/feature/test-mode-bypass
Use centralized is_test_mode() from PyAutoFit
2 parents d931a1c + e776ea2 commit 2448ebf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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)