File tree Expand file tree Collapse file tree
tests/unit/CodeEntropy/entropy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,9 +107,8 @@ def execute(self) -> None:
107107
108108 if self ._args .water_entropy and water_groups :
109109 if not nonwater_groups :
110- console .print (
111- "Warning: You are running waterEntropy on bulk water, "
112- "this will be slow!"
110+ logger .warning (
111+ "You are running waterEntropy on bulk water, this will be slow!"
113112 )
114113 self ._compute_water_entropy (frame_selection , water_groups )
115114 else :
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def test_execute_water_entropy_branch_calls_water_entropy_solver(
127127 patch ("CodeEntropy.entropy.workflow.WaterEntropy" ) as WaterCls ,
128128 patch ("CodeEntropy.entropy.workflow.LevelDAG" ) as LevelDAGCls ,
129129 patch ("CodeEntropy.entropy.workflow.EntropyGraph" ) as GraphCls ,
130- patch ("CodeEntropy.entropy.workflow.console " ) as console ,
130+ patch ("CodeEntropy.entropy.workflow.logger " ) as logger ,
131131 ):
132132 water_instance = WaterCls .return_value
133133 water_instance .calculate_and_log = MagicMock ()
@@ -139,10 +139,8 @@ def test_execute_water_entropy_branch_calls_water_entropy_solver(
139139
140140 water_instance .calculate_and_log .assert_called_once ()
141141 _ , kwargs = water_instance .calculate_and_log .call_args
142- warning = call (
143- "Warning: You are running waterEntropy on bulk water, this will be slow!"
144- )
145- assert (warning in console .print .call_args_list ) is expect_warning
142+ warning = call ("You are running waterEntropy on bulk water, this will be slow!" )
143+ assert (warning in logger .warning .call_args_list ) is expect_warning
146144 assert kwargs ["universe" ] is universe
147145 assert kwargs ["start" ] == 0
148146 assert kwargs ["end" ] == 5
You can’t perform that action at this time.
0 commit comments