Skip to content

Commit 70ab097

Browse files
authored
Merge pull request #91 from gerritholl/get-observer-look-scalar
Add get_observer_look test for scalar case and update stickler config
2 parents d7c7181 + 104ba09 commit 70ab097

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.stickler.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
linters:
22
flake8:
3-
max-line-length: 120
4-
fixer: true
5-
fixers:
6-
enable: true
3+
python: 3
4+
config: setup.cfg

pyorbital/tests/test_orbital.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ def _xarr_conv(input):
298298
np.testing.assert_allclose(azi.data.compute(), self.exp_azi)
299299
np.testing.assert_allclose(elev.data.compute(), self.exp_elev)
300300

301+
def test_scalar(self):
302+
"""Test with scalar inputs."""
303+
from pyorbital.orbital import get_observer_look
304+
(azi, elev) = get_observer_look(0, 0, 30_000_000, self.t, 0, 0, 0)
305+
np.testing.assert_allclose(elev, 90)
306+
301307

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

0 commit comments

Comments
 (0)