8000 Lookup altitude by nicomt · Pull Request #1518 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Lookup altitude #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moving _degrees_to_index test to test_tools
  • Loading branch information
nicomt committed Aug 21, 2022
commit 651461d65d1b8d91c6e5204f9e75bcf5d47fba26
7 changes: 0 additions & 7 deletions pvlib/tests/test_clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,6 @@ def monthly_lt_nointerp(lat, lon, time=months):
monthly_lt_nointerp(38.2, -181) # exceeds min longitude


def test_degrees_to_index_1():
"""Test that _degrees_to_index raises an error when something other than
'latitude' or 'longitude' is passed."""
with pytest.raises(IndexError): # invalid value for coordinate argument
clearsky._degrees_to_index(degrees=22.0, coordinate='width')


@pytest.fixture
def detect_clearsky_data():
data_file = DATA_DIR / 'detect_clearsky_data.csv'
Expand Down
7 changes: 7 additions & 0 deletions pvlib/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ def test__golden_sect_DataFrame_nans():
v, x = tools._golden_sect_DataFrame(params, lower, upper,
_obj_test_golden_sect)
assert np.allclose(x, expected, atol=1e-8, equal_nan=True)


def test_degrees_to_index_1():
"""Test that _degrees_to_index raises an error when something other than
'latitude' or 'longitude' is passed."""
with pytest.raises(IndexError): # invalid value for coordinate argument
tools._degrees_to_index(degrees=22.0, coordinate='width')
0