File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131from autolens .analysis .positions import PositionsLH
3232
3333from autolens import exc
34+ from autofit .non_linear .test_mode import is_test_mode
3435
3536logger = logging .getLogger (__name__ )
3637
@@ -104,7 +105,7 @@ def __init__(
104105 raise_inversion_positions_likelihood_exception
105106 )
106107
107- if os . environ . get ( "PYAUTOFIT_TEST_MODE" ) == "1" :
108+ if is_test_mode () :
108109 self .raise_inversion_positions_likelihood_exception = False
109110
110111 # Can be deleted after relevent AutoFIT PR merged
Original file line number Diff line number Diff line change 3131)
3232from autolens .lens .tracer import Tracer
3333from autolens .point .solver import PointSolver
34+ from autofit .non_linear .test_mode import is_test_mode
3435
3536logger = logging .getLogger (__name__ )
3637
@@ -303,7 +304,7 @@ def positions_likelihood_from(
303304 The `PositionsLH` object used to apply a likelihood penalty or resample the positions.
304305 """
305306
306- if os . environ . get ( "PYAUTOFIT_TEST_MODE" ) == "1" :
307+ if is_test_mode () :
307308 return
308309
309310 positions = (
Original file line number Diff line number Diff line change 11import os
22
33import autofit as af
4+ from autofit .non_linear .test_mode import is_test_mode
45
56from autogalaxy .quantity .model .plotter import PlotterQuantity
67
@@ -39,7 +40,7 @@ def visualize(
3940 via a non-linear search).
4041 """
4142
42- if os . environ . get ( "PYAUTOFIT_TEST_MODE" ) == "1" :
43+ if is_test_mode () :
4344 return
4445
4546 fit = analysis .fit_quantity_for_instance (instance = instance )
You can’t perform that action at this time.
0 commit comments