Skip to content

Commit ba5b0dd

Browse files
committed
some pep8 fixes
1 parent a5d59bc commit ba5b0dd

File tree

1 file changed

+55
-34
lines changed

1 file changed

+55
-34
lines changed

pvlib/test/test_irradiance.py

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from pvlib import atmosphere
1515

1616
# setup times and location to be tested.
17-
times = pd.date_range(start=datetime.datetime(2014,6,24),
18-
end=datetime.datetime(2014,6,26), freq='1Min')
17+
times = pd.date_range(start=datetime.datetime(2014, 6, 24),
18+
end=datetime.datetime(2014, 6, 26), freq='1Min')
1919

2020
tus = Location(32.2, -111, 'US/Arizona', 700)
2121

@@ -36,80 +36,101 @@
3636

3737
def test_extraradiation():
3838
assert_almost_equals(1382, irradiance.extraradiation(300), -1)
39-
39+
40+
4041
def test_extraradiation_dtindex():
4142
irradiance.extraradiation(times)
42-
43+
44+
4345
def test_extraradiation_doyarray():
4446
irradiance.extraradiation(times.dayofyear)
45-
47+
48+
4649
def test_extraradiation_asce():
47-
assert_almost_equals(1382, irradiance.extraradiation(300, method='asce'), -1)
48-
50+
assert_almost_equals(
51+
1382, irradiance.extraradiation(300, method='asce'), -1)
52+
53+
4954
def test_extraradiation_spencer():
50-
assert_almost_equals(1382, irradiance.extraradiation(300, method='spencer'), -1)
51-
55+
assert_almost_equals(
56+
1382, irradiance.extraradiation(300, method='spencer'), -1)
57+
58+
5259
def test_extraradiation_ephem_dtindex():
5360
irradiance.extraradiation(times, method='pyephem')
54-
61+
62+
5563
def test_extraradiation_ephem_scalar():
56-
assert_almost_equals(1382, irradiance.extraradiation(300, method='pyephem').values[0], -1)
57-
64+
assert_almost_equals(
65+
1382, irradiance.extraradiation(300, method='pyephem').values[0], -1)
66+
67+
5868
def test_extraradiation_ephem_doyarray():
5969
irradiance.extraradiation(times.dayofyear, method='pyephem')
6070

71+
6172
def test_grounddiffuse_simple_float():
6273
irradiance.grounddiffuse(40, 900)
6374

75+
6476
def test_grounddiffuse_simple_series():
6577
ground_irrad = irradiance.grounddiffuse(40, ghi)
6678
assert ground_irrad.name == 'diffuse_ground'
67-
79+
80+
6881
def test_grounddiffuse_albedo_0():
6982
ground_irrad = irradiance.grounddiffuse(40, ghi, albedo=0)
7083
assert 0 == ground_irrad.all()
7184

85+
7286
@raises(KeyError)
7387
def test_grounddiffuse_albedo_invalid_surface():
7488
irradiance.grounddiffuse(40, ghi, surface_type='invalid')
75-
89+
90+
7691
def test_grounddiffuse_albedo_surface():
7792
irradiance.grounddiffuse(40, ghi, surface_type='sand')
78-
93+
94+
7995
def test_isotropic_float():
8096
irradiance.isotropic(40, 100)
81-
97+
98+
8299
def test_isotropic_series():
83100
irradiance.isotropic(40, irrad_data['DHI'])
84101

102+
85103
def test_klucher_series_float():
86104
irradiance.klucher(40, 180, 100, 900, 20, 180)
87-
105+
106+
88107
def test_klucher_series():
89108
irradiance.klucher(40, 180, irrad_data['DHI'], irrad_data['GHI'],
90-
ephem_data['apparent_zenith'],
91-
ephem_data['apparent_azimuth'])
92-
109+
ephem_data['apparent_zenith'],
110+
ephem_data['apparent_azimuth'])
111+
112+
93113
def test_haydavies():
94114
irradiance.haydavies(40, 180, irrad_data['DHI'], irrad_data['DNI'],
95-
dni_et,
96-
ephem_data['apparent_zenith'],
97-
ephem_data['apparent_azimuth'])
98-
115+
dni_et,
116+
ephem_data['apparent_zenith'],
117+
ephem_data['apparent_azimuth'])
118+
119+
99120
def test_reindl():
100121
irradiance.reindl(40, 180, irrad_data['DHI'], irrad_data['DNI'],
101-
irrad_data['GHI'], dni_et,
102-
ephem_data['apparent_zenith'],
103-
ephem_data['apparent_azimuth'])
104-
122+
irrad_data['GHI'], dni_et,
123+
ephem_data['apparent_zenith'],
124+
ephem_data['apparent_azimuth'])
125+
126+
105127
def test_king():
106128
irradiance.king(40, irrad_data['DHI'], irrad_data['GHI'],
107-
ephem_data['apparent_zenith'])
108-
129+
ephem_data['apparent_zenith'])
130+
131+
109132
def test_perez():
110133
AM = atmosphere.relativeairmass(ephem_data['apparent_zenith'])
111134
irradiance.perez(40, 180, irrad_data['DHI'], irrad_data['DNI'],
112-
dni_et,
113-
ephem_data['apparent_zenith'],
114-
ephem_data['apparent_azimuth'],
115-
AM)
135+
dni_et, ephem_data['apparent_zenith'],
136+
ephem_data['apparent_azimuth'],AM)

0 commit comments

Comments
 (0)