|
4 | 4 |
|
5 | 5 | from pvlib.iotools import srml |
6 | 6 | from ..conftest import (DATA_DIR, RERUNS, RERUNS_DELAY, assert_index_equal, |
7 | | - assert_frame_equal, fail_on_pvlib_version) |
8 | | -from pvlib._deprecation import pvlibDeprecationWarning |
| 7 | + assert_frame_equal) |
9 | 8 |
|
10 | 9 | srml_testfile = DATA_DIR / 'SRML-day-EUPO1801.txt' |
11 | 10 |
|
@@ -88,47 +87,6 @@ def test_get_srml(): |
88 | 87 | assert_frame_equal(file_data, requested) |
89 | 88 |
|
90 | 89 |
|
91 | | -@fail_on_pvlib_version('0.11') |
92 | | -@pytest.mark.remote_data |
93 | | -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) |
94 | | -def test_read_srml_month_from_solardat(): |
95 | | - url = 'http://solardata.uoregon.edu/download/Archive/EUPO1801.txt' |
96 | | - file_data = srml.read_srml(url) |
97 | | - with pytest.warns(pvlibDeprecationWarning, match='get_srml instead'): |
98 | | - requested = srml.read_srml_month_from_solardat('EU', 2018, 1) |
99 | | - assert file_data.equals(requested) |
100 | | - |
101 | | - |
102 | | -@fail_on_pvlib_version('0.11') |
103 | | -@pytest.mark.remote_data |
104 | | -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) |
105 | | -def test_15_minute_dt_index(): |
106 | | - with pytest.warns(pvlibDeprecationWarning, match='get_srml instead'): |
107 | | - data = srml.read_srml_month_from_solardat('TW', 2019, 4, 'RQ') |
108 | | - start = pd.Timestamp('20190401 00:00') |
109 | | - start = start.tz_localize('Etc/GMT+8') |
110 | | - end = pd.Timestamp('20190430 23:45') |
111 | | - end = end.tz_localize('Etc/GMT+8') |
112 | | - assert data.index[0] == start |
113 | | - assert data.index[-1] == end |
114 | | - assert (data.index[3::4].minute == 45).all() |
115 | | - |
116 | | - |
117 | | -@fail_on_pvlib_version('0.11') |
118 | | -@pytest.mark.remote_data |
119 | | -@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) |
120 | | -def test_hourly_dt_index(): |
121 | | - with pytest.warns(pvlibDeprecationWarning, match='get_srml instead'): |
122 | | - data = srml.read_srml_month_from_solardat('CD', 1986, 4, 'PH') |
123 | | - start = pd.Timestamp('19860401 00:00') |
124 | | - start = start.tz_localize('Etc/GMT+8') |
125 | | - end = pd.Timestamp('19860430 23:00') |
126 | | - end = end.tz_localize('Etc/GMT+8') |
127 | | - assert data.index[0] == start |
128 | | - assert data.index[-1] == end |
129 | | - assert (data.index.minute == 0).all() |
130 | | - |
131 | | - |
132 | 90 | @pytest.mark.remote_data |
133 | 91 | @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) |
134 | 92 | def test_get_srml_hourly(): |
|
0 commit comments