satpy.tests.reader_tests.test_utils module

Testing of helper functions.

class satpy.tests.reader_tests.test_utils.TestHelpers(methodName='runTest')[source]

Bases: TestCase

Test the area helpers.

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.

test_apply_rad_correction()[source]

Test radiance correction technique using user-supplied coefs.

test_generic_open_BZ2File(bz2_mock)[source]

Test the generic_open method with bz2 filename input.

test_generic_open_FSFile_MemoryFileSystem()[source]

Test the generic_open method with FSFile in MemoryFileSystem.

test_generic_open_binary()[source]

Test the bz2 file unzipping context manager using dummy binary data.

test_generic_open_filename(open_mock)[source]

Test the generic_open method with filename (str).

test_generic_open_text()[source]

Test the bz2 file unzipping context manager using dummy text data.

test_geostationary_mask()[source]

Test geostationary mask.

test_get_earth_radius()[source]

Test earth radius computation.

test_get_geostationary_angle_extent()[source]

Get max geostationary angles.

test_get_geostationary_bbox()[source]

Get the geostationary bbox.

test_get_user_calibration_factors()[source]

Test the retrieval of user-supplied calibration factors.

test_lonlat_from_geos()[source]

Get lonlats from geos.

test_np2str()[source]

Test the np2str function.

test_pro_reading_gets_unzipped_file(fake_unzip_file, fake_remove)[source]

Test the bz2 file unzipping context manager.

test_reduce_mda()[source]

Test metadata size reduction.

test_sub_area(adef)[source]

Sub area slicing.

test_unzip_file(mock_popen, mock_bz2)[source]

Test the bz2 file unzipping techniques.

class satpy.tests.reader_tests.test_utils.TestSunEarthDistanceCorrection[source]

Bases: object

Tests for applying Sun-Earth distance correction to reflectance.

setup_method()[source]

Create input / output arrays for the tests.

test_apply_sunearth_corr()[source]

Test the correction of reflectances with sun-earth distance.

test_get_utc_time()[source]

Test the retrieval of scene time from a dataset.

test_remove_sunearth_corr()[source]

Test the removal of the sun-earth distance correction.