Skip to content

Commit

Permalink
Merge pull request #91 from gerritholl/get-observer-look-scalar
Browse files Browse the repository at this point in the history
Add get_observer_look test for scalar case and update stickler config
  • Loading branch information
mraspaud authored Dec 20, 2021
2 parents d7c7181 + 104ba09 commit 70ab097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
linters:
flake8:
max-line-length: 120
fixer: true
fixers:
enable: true
python: 3
config: setup.cfg
6 changes: 6 additions & 0 deletions pyorbital/tests/test_orbital.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ def _xarr_conv(input):
np.testing.assert_allclose(azi.data.compute(), self.exp_azi)
np.testing.assert_allclose(elev.data.compute(), self.exp_elev)

def test_scalar(self):
"""Test with scalar inputs."""
from pyorbital.orbital import get_observer_look
(azi, elev) = get_observer_look(0, 0, 30_000_000, self.t, 0, 0, 0)
np.testing.assert_allclose(elev, 90)


class TestGetObserverLookNadir(unittest.TestCase):
"""Test the get_observer_look function when satellite is at nadir."""
Expand Down

0 comments on commit 70ab097

Please sign in to comment.