Skip to content

Commit b4486c1

Browse files
CameronTStarkmikofskiwholmgren
authored
remove needs_pandas decorator (#885)
* remove definition and applications of pandas_0_22 decorator * remove needs_pandas_0_17 * Fix backwards path sep (#876) Fixes #875 * readd needs_pandas_0_22 for test_irradiance.py in travis py35-min * forecast compat with pandas 1.0, fix bug in Location tz handling (#879) * fix location tz bug with datetime.timezone.utc * update whatsnew * issue in whatsnew * fix whatsnew class typo * remove definition and applications of pandas_0_22 decorator * remove needs_pandas_0_17 * readd needs_pandas_0_22 for test_irradiance.py in travis py35-min Co-authored-by: Mark Mikofski <[email protected]> Co-authored-by: Will Holmgren <[email protected]>
1 parent fb5dcee commit b4486c1

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

pvlib/tests/conftest.py

-8
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ def inner():
7070
requires_ephem = pytest.mark.skipif(not has_ephem, reason='requires ephem')
7171

7272

73-
def pandas_0_17():
74-
return parse_version(pd.__version__) >= parse_version('0.17.0')
75-
76-
77-
needs_pandas_0_17 = pytest.mark.skipif(
78-
not pandas_0_17(), reason='requires pandas 0.17 or greater')
79-
80-
8173
def numpy_1_10():
8274
return parse_version(np.__version__) >= parse_version('1.10.0')
8375

pvlib/tests/iotools/test_psm3.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
from pvlib.iotools import psm3
7-
from conftest import needs_pandas_0_22, DATA_DIR
7+
from conftest import DATA_DIR
88
import numpy as np
99
import pandas as pd
1010
import pytest
@@ -70,7 +70,6 @@ def assert_psm3_equal(header, data, expected):
7070
assert (data.index.tzinfo.zone == 'Etc/GMT%+d' % -header['Time Zone'])
7171

7272

73-
@needs_pandas_0_22
7473
@pytest.mark.flaky(reruns=5, reruns_delay=2)
7574
def test_get_psm3_tmy(nrel_api_key):
7675
"""test get_psm3 with a TMY"""
@@ -80,7 +79,6 @@ def test_get_psm3_tmy(nrel_api_key):
8079
assert_psm3_equal(header, data, expected)
8180

8281

83-
@needs_pandas_0_22
8482
@pytest.mark.flaky(reruns=5, reruns_delay=2)
8583
def test_get_psm3_singleyear(nrel_api_key):
8684
"""test get_psm3 with a single year"""
@@ -90,7 +88,6 @@ def test_get_psm3_singleyear(nrel_api_key):
9088
assert_psm3_equal(header, data, expected)
9189

9290

93-
@needs_pandas_0_22
9491
@pytest.mark.flaky(reruns=5, reruns_delay=2)
9592
def test_get_psm3_check_leap_day(nrel_api_key):
9693
_, data_2012 = psm3.get_psm3(LATITUDE, LONGITUDE, nrel_api_key,
@@ -105,7 +102,6 @@ def test_get_psm3_check_leap_day(nrel_api_key):
105102
(LATITUDE, LONGITUDE, nrel_api_key, 'bad', 60),
106103
(LATITUDE, LONGITUDE, nrel_api_key, '2017', 15),
107104
])
108-
@needs_pandas_0_22
109105
@pytest.mark.flaky(reruns=5, reruns_delay=2)
110106
def test_get_psm3_tmy_errors(
111107
latitude, longitude, api_key, names, interval
@@ -134,15 +130,13 @@ def io_input(request):
134130
return obj
135131

136132

137-
@needs_pandas_0_22
138133
def test_parse_psm3(io_input):
139134
"""test parse_psm3"""
140135
header, data = psm3.parse_psm3(io_input)
141136
expected = pd.read_csv(YEAR_TEST_DATA)
142137
assert_psm3_equal(header, data, expected)
143138

144139

145-
@needs_pandas_0_22
146140
def test_read_psm3():
147141
"""test read_psm3"""
148142
header, data = psm3.read_psm3(MANUAL_TEST_DATA)

pvlib/tests/test_solarposition.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from pvlib.location import Location
1313
from pvlib import solarposition, spa
1414

15-
from conftest import (requires_ephem, needs_pandas_0_17,
16-
requires_spa_c, requires_numba)
15+
from conftest import requires_ephem, requires_spa_c, requires_numba
1716

1817

1918
# setup times and locations to be tested.
@@ -164,7 +163,6 @@ def test_spa_python_numpy_physical_dst(expected_solpos, golden):
164163
assert_frame_equal(expected_solpos, ephem_data[expected_solpos.columns])
165164

166165

167-
@needs_pandas_0_17
168166
def test_sun_rise_set_transit_spa(expected_rise_set_spa, golden):
169167
# solution from NREL SAP web calculator
170168
south = Location(-35.0, 0.0, tz='UTC')

0 commit comments

Comments
 (0)