File tree 1 file changed +16
-2
lines changed 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 5
5
import os
6
6
7
7
test_dir = os .path .dirname (os .path .abspath (inspect .getfile (inspect .currentframe ())))
8
+ tmy3_testfile = os .path .join (test_dir , '../data/703165TY.csv' )
9
+ tmy2_testfile = os .path .join (test_dir , '../data/12839.tm2' )
8
10
9
11
from pvlib import tmy
10
12
11
13
12
14
def test_readtmy3 ():
13
- tmy .readtmy3 (os .path .join (test_dir , '../data/703165TY.csv' ))
15
+ tmy .readtmy3 (tmy3_testfile )
16
+
17
+ def test_readtmy3_remote ():
18
+ url = 'http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/703165TYA.CSV'
19
+ tmy .readtmy3 (url )
20
+
21
+ def test_readtmy3_recolumn ():
22
+ data , meta = tmy .readtmy3 (tmy3_testfile )
23
+ assert 'GHISource' in data .columns
24
+
25
+ def test_readtmy3_norecolumn ():
26
+ data , meta = tmy .readtmy3 (tmy3_testfile , recolumn = False )
27
+ assert 'GHI source' in data .columns
14
28
15
29
def test_readtmy2 ():
16
- tmy .readtmy2 (os . path . join ( test_dir , '../data/12839.tm2' ) )
30
+ tmy .readtmy2 (tmy2_testfile )
17
31
You can’t perform that action at this time.
0 commit comments