satpy.tests.reader_tests.test_hsaf_grib module

Module for testing the satpy.readers.grib module.

class satpy.tests.reader_tests.test_hsaf_grib.FakeGRIB(messages=None, proj_params=None, latlons=None)[source]

Bases: object

Fake GRIB file returned by pygrib.open.

Init the fake grib file.

message(msg_num)[source]

Fake message.

seek(loc)[source]

Fake seek.

class satpy.tests.reader_tests.test_hsaf_grib.FakeMessage(values, proj_params=None, latlons=None, **attrs)[source]

Bases: object

Fake message returned by pygrib.open().message(x).

Init the fake message.

latlons()[source]

Get the latlons.

valid_key(key)[source]

Check if key is valid.

class satpy.tests.reader_tests.test_hsaf_grib.TestHSAFFileHandler(methodName='runTest')[source]

Bases: TestCase

Test HSAF Reader.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

_classSetupFailed = False
_class_cleanups = []
setUp()[source]

Wrap pygrib to read fake data.

tearDown()[source]

Re-enable pygrib import.

test_get_area_def(pg)[source]

Test the area definition setup, checks the size and extent.

test_get_dataset(pg)[source]

Test reading the actual datasets from a grib file.

test_init(pg)[source]

Test the init function, ensure that the correct dates and metadata are returned.