From 554037156fbb8178371b7fab886d137ae9e4f628 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Thu, 6 May 2021 10:31:50 -0600 Subject: [PATCH 1/3] srml: flaky -> xfail --- pvlib/tests/iotools/test_srml.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pvlib/tests/iotools/test_srml.py b/pvlib/tests/iotools/test_srml.py index 556bd7111d..a7748d3932 100644 --- a/pvlib/tests/iotools/test_srml.py +++ b/pvlib/tests/iotools/test_srml.py @@ -3,7 +3,7 @@ import pytest from pvlib.iotools import srml -from ..conftest import DATA_DIR, RERUNS, RERUNS_DELAY +from ..conftest import DATA_DIR # , RERUNS, RERUNS_DELAY srml_testfile = DATA_DIR / 'SRML-day-EUPO1801.txt' @@ -13,7 +13,8 @@ def test_read_srml(): @pytest.mark.remote_data -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +@pytest.mark.xfail(strict=True) def test_read_srml_remote(): srml.read_srml('http://solardat.uoregon.edu/download/Archive/EUPO1801.txt') @@ -41,7 +42,8 @@ def test_read_srml_nans_exist(): 2016, 12), ]) @pytest.mark.remote_data -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +@pytest.mark.xfail(strict=True) def test_read_srml_dt_index(url, year, month): data = srml.read_srml(url) start = pd.Timestamp(f'{year:04d}{month:02d}01 00:00') @@ -65,7 +67,8 @@ def test_map_columns(column, expected): @pytest.mark.remote_data -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +@pytest.mark.xfail(strict=True) def test_read_srml_month_from_solardat(): url = 'http://solardat.uoregon.edu/download/Archive/EUPO1801.txt' file_data = srml.read_srml(url) @@ -74,7 +77,8 @@ def test_read_srml_month_from_solardat(): @pytest.mark.remote_data -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +@pytest.mark.xfail(strict=True) def test_15_minute_dt_index(): data = srml.read_srml_month_from_solardat('TW', 2019, 4, 'RQ') start = pd.Timestamp('20190401 00:00') @@ -87,7 +91,8 @@ def test_15_minute_dt_index(): @pytest.mark.remote_data -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) +@pytest.mark.xfail(strict=True) def test_hourly_dt_index(): data = srml.read_srml_month_from_solardat('CD', 1986, 4, 'PH') start = pd.Timestamp('19860401 00:00') From cfc6d04536cd7209e23504c4f646a04a80ebae49 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Thu, 6 May 2021 10:32:38 -0600 Subject: [PATCH 2/3] pvgis copyright text --- pvlib/tests/iotools/test_pvgis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pvlib/tests/iotools/test_pvgis.py b/pvlib/tests/iotools/test_pvgis.py index 314303e06e..a6c3c4510b 100644 --- a/pvlib/tests/iotools/test_pvgis.py +++ b/pvlib/tests/iotools/test_pvgis.py @@ -159,8 +159,9 @@ def _compare_pvgis_tmy_csv(expected, month_year_expected, inputs_expected, for meta_value in meta: if not meta_value: continue - # don't check end year because it changes every year - if meta_value[:-4] == 'PVGIS (c) European Communities, 2001-': + # this copyright text tends to change (copyright year range increments + # annually, e.g.), so just check the beginning of it: + if meta_value.startswith('PVGIS (c) European'): continue assert meta_value in csv_meta From 8dc814a2b44d23769e3e941020063687b887d13d Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Thu, 6 May 2021 20:45:58 -0600 Subject: [PATCH 3/3] Revert "srml: flaky -> xfail" This reverts commit 554037156fbb8178371b7fab886d137ae9e4f628. --- pvlib/tests/iotools/test_srml.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pvlib/tests/iotools/test_srml.py b/pvlib/tests/iotools/test_srml.py index a7748d3932..556bd7111d 100644 --- a/pvlib/tests/iotools/test_srml.py +++ b/pvlib/tests/iotools/test_srml.py @@ -3,7 +3,7 @@ import pytest from pvlib.iotools import srml -from ..conftest import DATA_DIR # , RERUNS, RERUNS_DELAY +from ..conftest import DATA_DIR, RERUNS, RERUNS_DELAY srml_testfile = DATA_DIR / 'SRML-day-EUPO1801.txt' @@ -13,8 +13,7 @@ def test_read_srml(): @pytest.mark.remote_data -# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) -@pytest.mark.xfail(strict=True) +@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_read_srml_remote(): srml.read_srml('http://solardat.uoregon.edu/download/Archive/EUPO1801.txt') @@ -42,8 +41,7 @@ def test_read_srml_nans_exist(): 2016, 12), ]) @pytest.mark.remote_data -# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) -@pytest.mark.xfail(strict=True) +@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_read_srml_dt_index(url, year, month): data = srml.read_srml(url) start = pd.Timestamp(f'{year:04d}{month:02d}01 00:00') @@ -67,8 +65,7 @@ def test_map_columns(column, expected): @pytest.mark.remote_data -# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) -@pytest.mark.xfail(strict=True) +@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_read_srml_month_from_solardat(): url = 'http://solardat.uoregon.edu/download/Archive/EUPO1801.txt' file_data = srml.read_srml(url) @@ -77,8 +74,7 @@ def test_read_srml_month_from_solardat(): @pytest.mark.remote_data -# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) -@pytest.mark.xfail(strict=True) +@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_15_minute_dt_index(): data = srml.read_srml_month_from_solardat('TW', 2019, 4, 'RQ') start = pd.Timestamp('20190401 00:00') @@ -91,8 +87,7 @@ def test_15_minute_dt_index(): @pytest.mark.remote_data -# @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) -@pytest.mark.xfail(strict=True) +@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_hourly_dt_index(): data = srml.read_srml_month_from_solardat('CD', 1986, 4, 'PH') start = pd.Timestamp('19860401 00:00')