@@ -324,12 +324,18 @@ def test__evaluate_signal_fail(self, mock_sigllm, mock_load_signal, mock_load_an
324324 self .pipeline_name , hyperparameters = self .hyperparameters
325325 )
326326
327+ @patch ('sigllm.benchmark.load_normal' )
327328 @patch ('sigllm.benchmark.load_anomalies' )
328329 @patch ('sigllm.benchmark._load_signal' )
329330 @patch ('sigllm.benchmark.SigLLM' )
330331 def test__evaluate_signal_with_few_shot (
331- self , mock_sigllm , mock_load_signal , mock_load_anomalies
332+ self ,
333+ mock_sigllm ,
334+ mock_load_signal ,
335+ mock_load_anomalies ,
336+ mock_load_normal ,
332337 ):
338+ mock_load_normal .return_value = self .test_data
333339 mock_load_signal .return_value = (None , self .test_data )
334340 mock_load_anomalies .return_value = self .truth_data
335341
@@ -349,8 +355,9 @@ def test__evaluate_signal_with_few_shot(
349355
350356 assert isinstance (result , dict )
351357 self .assertEqual (result ['status' ], 'OK' )
352- # TODO: fix this call to make normal a pandas dataframe
353- mock_pipeline .detect .assert_called_once_with (self .test_data , normal = None )
358+
359+ mock_pipeline .detect .assert_called_once_with (self .test_data , normal = self .test_data )
360+ mock_load_normal .assert_called_once_with (self .signal_name )
354361 mock_load_signal .assert_called_once_with (self .signal_name , self .test_split )
355362 mock_load_anomalies .assert_called_once_with (self .signal_name )
356363 mock_sigllm .assert_called_once_with (
0 commit comments