@@ -33,7 +33,7 @@ def test_episode_calculation_iglu_r_compatible(scenario):
3333 expected_results = scenario ["results" ]
3434 if "data" in expected_results :
3535 # this is extended expected result, with two separate dataframes
36- assert kwargs ["return_data" ] == True
36+ assert kwargs ["return_data" ]
3737 expected_episodes_df = pd .DataFrame (expected_results ['episodes' ]).reset_index (drop = True )
3838 expected_data_df = pd .DataFrame (expected_results ['data' ]).reset_index (drop = True )
3939 else :
@@ -46,15 +46,15 @@ def test_episode_calculation_iglu_r_compatible(scenario):
4646 if "time" in df .columns :
4747 df ["time" ] = pd .to_datetime (df ["time" ])
4848
49- if "return_data" in kwargs and kwargs ["return_data" ] == True :
49+ if "return_data" in kwargs and kwargs ["return_data" ]:
5050 result_episodes_df , result_data_df = iglu .episode_calculation (df , ** kwargs )
5151 else :
5252 result_episodes_df = iglu .episode_calculation (df , ** kwargs )
5353
5454 assert result_episodes_df is not None
5555
5656 # Compare DataFrames with precision to 0.001 for numeric columns
57- if "return_data" in kwargs and kwargs ["return_data" ] == True :
57+ if "return_data" in kwargs and kwargs ["return_data" ] :
5858 flag_columns = ['lv1_hypo' , 'lv2_hypo' , 'lv1_hyper' , 'lv2_hyper' , 'ext_hypo' , 'lv1_hypo_excl' , 'lv1_hyper_excl' ]
5959 for col in flag_columns :
6060 result_data_df [col ] = result_data_df [col ].astype (bool )
@@ -207,7 +207,7 @@ def test_episode_calculation_empty():
207207 """Test episode calculation with empty data"""
208208 empty_data = pd .DataFrame (columns = ["id" , "time" , "gl" ])
209209 with pytest .raises (ValueError ):
210- result = iglu .episode_calculation (empty_data )
210+ iglu .episode_calculation (empty_data )
211211
212212
213213def test_episode_calculation_constant_glucose ():
0 commit comments