@@ -441,6 +441,7 @@ def test_get_pvgis_tmy_coerce_year():
441
441
"""test utc_offset and coerce_year work as expected"""
442
442
base_case , _ , _ , _ = get_pvgis_tmy (45 , 8 ) # Turin
443
443
assert str (base_case .index .tz ) == 'UTC'
444
+ assert base_case .index .name == 'time(UTC)'
444
445
noon_test_data = [
445
446
base_case [base_case .index .month == m ].iloc [12 ]
446
447
for m in range (1 , 13 )]
@@ -452,6 +453,7 @@ def test_get_pvgis_tmy_coerce_year():
452
453
dec31_midnight = pd .Timestamp ('1990-12-31 23:00:00' , tz = cet_name )
453
454
assert pvgis_data .index [0 ] == jan1_midnight
454
455
assert pvgis_data .index [- 1 ] == dec31_midnight
456
+ assert pvgis_data .index .name == f'time({ cet_name } )'
455
457
# spot check rolled data matches original
456
458
for m , test_case in enumerate (noon_test_data ):
457
459
expected = pvgis_data [pvgis_data .index .month == m + 1 ].iloc [12 + cet_tz ]
@@ -464,6 +466,7 @@ def test_get_pvgis_tmy_coerce_year():
464
466
dec31_midnight = pd .Timestamp (f'{ test_yr } -12-31 23:00:00' , tz = cet_name )
465
467
assert pvgis_data .index [0 ] == jan1_midnight
466
468
assert pvgis_data .index [- 1 ] == dec31_midnight
469
+ assert pvgis_data .index .name == f'time({ cet_name } )'
467
470
for m , test_case in enumerate (noon_test_data ):
468
471
expected = pvgis_data [pvgis_data .index .month == m + 1 ].iloc [12 + cet_tz ]
469
472
assert all (test_case == expected )
@@ -473,6 +476,7 @@ def test_get_pvgis_tmy_coerce_year():
473
476
dec31_midnight = pd .Timestamp (f'{ test_yr } -12-31 23:00:00' , tz = 'UTC' )
474
477
assert pvgis_data .index [0 ] == jan1_midnight
475
478
assert pvgis_data .index [- 1 ] == dec31_midnight
479
+ assert pvgis_data .index .name == 'time(UTC)'
476
480
for m , test_case in enumerate (noon_test_data ):
477
481
expected = pvgis_data [pvgis_data .index .month == m + 1 ].iloc [12 ]
478
482
assert all (test_case == expected )
0 commit comments