@@ -174,7 +174,7 @@ def test_pv_powers_by_customer_type(cleanup_project):
174174 }
175175 run_project_with_custom_exports (path , "scenario1" , SIMULATION_SETTINGS_FILENAME , data )
176176 total_sum2 = sum (_get_summed_element_total (path , "PVSystems" , "PowersSum" ).values ())
177- assert math .isclose (total_sum1 , total_sum2 )
177+ assert math .isclose (total_sum1 . real , total_sum2 . real ) and math . isclose ( total_sum1 . imag , total_sum2 . imag )
178178
179179 # Collect power for PVSystems aggregated by customer type at every time point.
180180 data = {
@@ -197,8 +197,8 @@ def test_pv_powers_by_customer_type(cleanup_project):
197197 run_project_with_custom_exports (path , "scenario1" , SIMULATION_SETTINGS_FILENAME , data )
198198 com_sum3 = _get_summed_element_dataframe (path , "PVSystems" , "Powers" , group = "com" ).sum ().sum ()
199199 res_sum3 = _get_summed_element_dataframe (path , "PVSystems" , "Powers" , group = "res" ).sum ().sum ()
200- assert math .isclose (com_sum1 , com_sum3 )
201- assert math .isclose (res_sum1 , res_sum3 )
200+ assert math .isclose (com_sum1 . real , com_sum3 . real ) and math . isclose ( com_sum1 . imag , com_sum3 . imag )
201+ assert math .isclose (res_sum1 . real , res_sum3 . real ) and math . isclose ( res_sum1 . imag , res_sum3 . imag )
202202
203203 # Collect a running sum for all PVSystems by customer type.
204204 data = {
@@ -221,8 +221,8 @@ def test_pv_powers_by_customer_type(cleanup_project):
221221 run_project_with_custom_exports (path , "scenario1" , SIMULATION_SETTINGS_FILENAME , data )
222222 com_sum4 = sum (_get_summed_element_total (path , "PVSystems" , "PowersSum" , group = "com" ).values ())
223223 res_sum4 = sum (_get_summed_element_total (path , "PVSystems" , "PowersSum" , group = "res" ).values ())
224- assert math .isclose (com_sum1 , com_sum4 )
225- assert math .isclose (res_sum1 , res_sum4 )
224+ assert math .isclose (com_sum1 . real , com_sum4 . real ) and math . isclose ( com_sum1 . imag , com_sum4 . imag )
225+ assert math .isclose (res_sum1 . real , res_sum4 . real ) and math . isclose ( res_sum1 . imag , res_sum4 . imag )
226226
227227
228228def _get_customer_type_columns (df , com_pv_systems , res_pv_systems ):
0 commit comments