Skip to content

Commit

Permalink
Add test to check if data returned by get_dataset is a dask array
Browse files Browse the repository at this point in the history
  • Loading branch information
wroberts4 committed Jun 3, 2019
1 parent 4292b93 commit ccdb401
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions satpy/tests/reader_tests/test_virr_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ def _fy3_helper(self, platform_name, reader, Emissive_units):
'E1': 496.542155, 'E2': 297.444511, 'E3': 288.956557, 'solar_zenith_angle': .1,
'satellite_zenith_angle': .1, 'solar_azimuth_angle': .1, 'satellite_azimuth_angle': .1,
'longitude': 10}
datasets = reader.load([band for band, val in band_values.items()])
datasets = reader.load([band for band in band_values])
for dataset in datasets:
# Object returned by get_dataset.
ds = datasets[dataset.name]
attributes = ds.attrs
self.assertTrue(isinstance(ds.data, da.Array))
self.assertEqual('VIRR', attributes['sensor'])
self.assertEqual(platform_name, attributes['platform_name'])
self.assertEqual(datetime.datetime(2018, 12, 25, 21, 41, 47, 90000), attributes['start_time'])
Expand Down Expand Up @@ -166,7 +168,7 @@ def test_fy3b_file(self):
self.assertTrue(FY3B_reader.file_handlers)
self._fy3_helper('FY3B', FY3B_reader, 'milliWstts/m^2/cm^(-1)/steradian')

def test_FY3C_file(self):
def test_fy3c_file(self):
from satpy.readers import load_reader
FY3C_reader = load_reader(self.reader_configs)
FY3C_files = FY3C_reader.select_files_from_pathnames(['tf2018359143912.FY3C-L_VIRRX_GEOXX.HDF',
Expand Down

0 comments on commit ccdb401

Please sign in to comment.