Skip to content

Commit

Permalink
Merge pull request #185 from pytroll/bugfix-nwcsaf_pps-reader
Browse files Browse the repository at this point in the history
Bugfix nwcsaf_pps reader for file discoverability
  • Loading branch information
mraspaud authored Feb 7, 2018
2 parents 3414a18 + 04e753d commit 1471e6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion satpy/etc/readers/nc_nwcsaf_pps.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
reader:
description: NetCDF4 reader for the NWCSAF/PPS 2014 format
name: nc_nwcsaf
name: nc_nwcsaf_pps
sensors: ['avhrr-3', 'viirs', 'modis']
default_channels: []
reader: !!python/name:satpy.readers.yaml_reader.FileYAMLReader
Expand Down
13 changes: 13 additions & 0 deletions satpy/tests/test_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@ def test_reader_name(self):
finally:
os.remove(fn)

def test_reader_other_name(self):
"""Test with default base_dir and reader specified"""
from satpy.readers import find_files_and_readers
fn = 'S_NWC_CPP_npp_32505_20180204T1114116Z_20180204T1128227Z.nc'
# touch the file so it exists on disk
open(fn, 'w')
try:
ri = find_files_and_readers(reader='nc_nwcsaf_pps')
self.assertListEqual(list(ri.keys()), ['nc_nwcsaf_pps'])
self.assertListEqual(ri['nc_nwcsaf_pps'], [fn])
finally:
os.remove(fn)

def test_reader_name_matched_start_end_time(self):
"""Test with start and end time matching the filename"""
from satpy.readers import find_files_and_readers
Expand Down

0 comments on commit 1471e6c

Please sign in to comment.