Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfinkens committed May 6, 2020
1 parent 9cc0941 commit 0cd0779
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions satpy/tests/reader_tests/test_ahi_hrit.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def test_get_dataset(self, base_get_dataset):
key.calibration = 'reflectance'

base_get_dataset.return_value = DataArray(da.ones((275, 1375),
chunks=1024))
chunks=1024),
dims=('y', 'x'))

# Check attributes
res = reader.get_dataset(key, {'units': '%', 'sensor': 'ahi'})
Expand Down Expand Up @@ -300,8 +301,10 @@ def test_get_dataset(self, base_get_dataset):
def test_mjd2datetime64(self):
"""Test conversion from modified julian day to datetime64"""
from satpy.readers.hrit_jma import mjd2datetime64
self.assertEqual(mjd2datetime64(0), np.datetime64('1858-11-17', 'us'))
self.assertEqual(mjd2datetime64(40587.5), np.datetime64('1970-01-01 12:00', 'us'))
self.assertEqual(mjd2datetime64(np.array([0])),
np.datetime64('1858-11-17', 'us'))
self.assertEqual(mjd2datetime64(np.array([40587.5])),
np.datetime64('1970-01-01 12:00', 'us'))

def test_get_acq_time(self):
"""Test computation of scanline acquisition times."""
Expand Down

0 comments on commit 0cd0779

Please sign in to comment.