Skip to content

Commit

Permalink
pytest getEPW
Browse files Browse the repository at this point in the history
added test for lines 424-495 (71 continuous lines) for getEPW. 2% improvement in coverage of Main (at 62% now.
  • Loading branch information
shirubana committed Nov 27, 2019
1 parent cd709aa commit 76c2767
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_bifacial_radiance.py
Expand Up @@ -35,7 +35,11 @@ def test_RadianceObj_set1axis():
# test set1axis. requires metdata for boulder.
name = "_test_set1axis"
demo = bifacial_radiance.RadianceObj(name)
metdata = demo.readEPW(epwfile = MET_FILENAME)
try:
epwfile = demo.getEPW(lat=40.01667, lon=-105.25) # From EPW: {N 40° 1'} {W 105° 15'}
except: # adding an except in case the internet connection in the lab forbids the epw donwload.
epwfile = MET_FILENAME
metdata = demo.readEPW(epwfile = epwfile)
trackerdict = demo.set1axis()
assert trackerdict[0]['count'] == 80 #this was 108 < v0.2.4 and 75 < 0.3.2
assert trackerdict[45]['count'] == 822 #this was 823 < 0.3.2
Expand Down

0 comments on commit 76c2767

Please sign in to comment.