Skip to content

Commit 4a85a83

Browse files
committed
update test_pvgis.py
1 parent 67c34a1 commit 4a85a83

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pvlib/tests/iotools/test_pvgis.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def test_read_pvgis_hourly_empty_file():
304304
# PVGIS TMY tests
305305
@pytest.fixture
306306
def expected():
307-
return pd.read_csv(DATA_DIR / 'pvgis_tmy_test.dat', index_col='time(UTC)')
307+
return pd.read_csv(DATA_DIR / 'pvgis_tmy_test.csv', index_col='time(UTC)')
308308

309309

310310
@pytest.fixture
@@ -315,18 +315,18 @@ def userhorizon_expected():
315315
@pytest.fixture
316316
def month_year_expected():
317317
return [
318-
2014, 2011, 2008, 2011, 2009, 2011, 2020, 2006, 2006, 2013, 2007, 2018]
318+
2018, 2007, 2009, 2013, 2008, 2006, 2011, 2010, 2020, 2006, 2007, 2016]
319319

320320

321321
@pytest.fixture
322322
def inputs_expected():
323323
return {
324324
'location': {'latitude': 45.0, 'longitude': 8.0, 'elevation': 250.0},
325325
'meteo_data': {
326-
'radiation_db': 'PVGIS-SARAH2',
326+
'radiation_db': 'PVGIS-SARAH3',
327327
'meteo_db': 'ERA5',
328328
'year_min': 2005,
329-
'year_max': 2020,
329+
'year_max': 2023,
330330
'use_horizon': True,
331331
'horizon_db': 'DEM-calculated'}}
332332

@@ -564,14 +564,14 @@ def test_read_pvgis_horizon_invalid_coords():
564564

565565

566566
def test_read_pvgis_tmy_map_variables(pvgis_tmy_mapped_columns):
567-
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.json'
567+
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.json'
568568
actual, _, _, _ = read_pvgis_tmy(fn, map_variables=True)
569569
assert all(c in pvgis_tmy_mapped_columns for c in actual.columns)
570570

571571

572572
def test_read_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
573573
meta_expected):
574-
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.json'
574+
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.json'
575575
# infer outputformat from file extensions
576576
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
577577
_compare_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
@@ -588,7 +588,7 @@ def test_read_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
588588

589589

590590
def test_read_pvgis_tmy_epw(expected, epw_meta):
591-
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.epw'
591+
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.epw'
592592
# infer outputformat from file extensions
593593
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
594594
_compare_pvgis_tmy_epw(expected, epw_meta, pvgis_data)
@@ -603,7 +603,7 @@ def test_read_pvgis_tmy_epw(expected, epw_meta):
603603

604604
def test_read_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
605605
meta_expected, csv_meta):
606-
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.csv'
606+
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.csv'
607607
# infer outputformat from file extensions
608608
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
609609
_compare_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
@@ -620,7 +620,7 @@ def test_read_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
620620

621621

622622
def test_read_pvgis_tmy_basic(expected, meta_expected):
623-
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.txt'
623+
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.txt'
624624
# XXX: can't infer outputformat from file extensions for basic
625625
with pytest.raises(ValueError, match="pvgis format 'txt' was unknown"):
626626
read_pvgis_tmy(fn, map_variables=False)

0 commit comments

Comments
 (0)