satpy.tests.reader_tests.test_hdf5_utils module

Module for testing the satpy.readers.hdf5_utils module.

class satpy.tests.reader_tests.test_hdf5_utils.FakeHDF5FileHandler(filename, filename_info, filetype_info, **kwargs)[source]

Bases: HDF5FileHandler

Swap HDF5 File Handler for reader tests to use.

Get fake file content from ‘get_test_content’.

get_test_content(filename, filename_info, filetype_info)[source]

Mimic reader input file content.

  • filename (str) – input filename

  • filename_info (dict) – Dict of metadata pulled from filename

  • filetype_info (dict) – Dict of metadata from the reader’s yaml config for this file type

Returns: dict of file content with keys like:

  • ‘dataset’

  • ‘/attr/global_attr’

  • ‘dataset/attr/global_attr’

  • ‘dataset/shape’

class satpy.tests.reader_tests.test_hdf5_utils.TestHDF5FileHandler(methodName='runTest')[source]

Bases: TestCase

Test HDF5 File Handler Utility class.

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 = []

Create a test HDF5 file.


Remove the previously created test file.


Test everything about the HDF5 class.