Skip to content

Commit

Permalink
Adjust how attributes are removed for error testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeceglie committed Apr 18, 2024
1 parent d5c8cf5 commit c7f34ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rdtools/test/analysis_chains_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,13 @@ def test_errors(sensor_parameters, clearsky_analysis):
rdtemp._sensor_preprocess()

# clearsky analysis with no tilt/azm
del clearsky_analysis.pv_tilt
clearsky_analysis.poa_global_clearsky = None # just needs to exist to test these errors
with pytest.raises(ValueError, match='pv_tilt and pv_azimuth must be provided'):
clearsky_analysis._clearsky_preprocess()

# clearsky analysis with no pvlib.loc
del clearsky_analysis.pvlib_location
with pytest.raises(ValueError, match='pvlib location must be provided'):
clearsky_analysis._clearsky_preprocess()

Expand Down

0 comments on commit c7f34ec

Please sign in to comment.