satpy.tests.reader_tests.utils module

Utilities for reader tests.

satpy.tests.reader_tests.utils._is_jit_method(obj)[source]
satpy.tests.reader_tests.utils.default_attr_processor(root, attr)[source]

Do not change the attribute.

satpy.tests.reader_tests.utils.fill_h5(root, contents, attr_processor=<function default_attr_processor>)[source]

Fill hdf5 file with the given contents.

Parameters:
  • root – hdf5 file rott

  • contents – Contents to be written into the file

  • attr_processor – A method for modifying attributes before they are written to the file.

satpy.tests.reader_tests.utils.get_jit_methods(module)[source]

Get all jit-compiled methods in a module.

satpy.tests.reader_tests.utils.skip_numba_unstable_if_missing()[source]

Determine if numba-based tests should be skipped during unstable CI tests.

If numba fails to import it could be because numba is not compatible with a newer version of numpy. This is very likely to happen in the unstable/experimental CI environment. This function returns True if numba-based tests should be skipped if numba could not be imported and we’re in the unstable environment. We determine if we’re in this CI environment by looking for the UNSTABLE="1" environment variable.