Skip to content

Commit

Permalink
Fix pytests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed May 22, 2024
1 parent 28e2d60 commit 93e0ec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_bifacial_radiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ def test_1axis_gencumSky():
# assert trackerdict[-5.0]['radfile'] == 'objects\\1axis-5.0_1.825_11.42_5.0_10x3_origin0,0.rad'
sceneDict = {'pitch': pitch,'height':hub_height, 'hub_height':hub_height, 'nMods':10, 'nRows':3} # testing height filter too
customObject = demo.makeCustomObject('whiteblock','! genbox white_EPDM whiteblock 1.6 4.5 0.5 | xform -t -0.8 -2.25 0')
#demo.appendtoScene(scene.radfiles, customObject, '!xform -rz 0')
trackerdict = demo.makeScene1axis(sceneDict=sceneDict, module = 'test-module', customtext='!xform -rz 90 '+customObject, append=True)#
trackerdict = demo.makeScene1axis(sceneDict=sceneDict, module = 'test-module', customtext=' -rz 90 '+customObject, append=True)#
assert trackerdict[-5.0]['scenes'].__len__() == 4
fname = trackerdict[-5.0]['scenes'][3].radfiles
with open(fname, 'r') as f:
Expand All @@ -265,7 +264,8 @@ def test_1axis_gencumSky():

CECMod = pd.read_csv(os.path.join(TESTDIR, 'Canadian_Solar_Inc__CS5P_220M.csv'),
index_col=0).iloc[:,0]
results = demo.calculateResults(CECMod=CECMod)
module.addCEC(CECMod)
results = demo.calculateResults1axis(module=module)
pd.testing.assert_frame_equal(results, demo.CompiledResults)
assert results.iloc[0].Grear_mean == pytest.approx(210, abs=30) #gencumsky has lots of variability
assert results.__len__() == 4
Expand Down

0 comments on commit 93e0ec5

Please sign in to comment.