satpy.tests.test_utils module

Testing of utils.

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

Bases: TestCase

Test the ‘check_satpy’ function.

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_basic_check_satpy()[source]

Test ‘check_satpy’ basic functionality.

test_specific_check_satpy()[source]

Test ‘check_satpy’ with specific features provided.

class satpy.tests.test_utils.TestGetSatPos[source]

Bases: object

Tests for ‘get_satpos’.

test_get_satpos(included_prefixes, preference, expected_result)[source]

Test getting the satellite position.

test_get_satpos_fails_with_informative_error(attrs)[source]

Test that get_satpos raises an informative error message.

test_get_satpos_from_satname(caplog)[source]

Test getting satellite position from satellite name only.

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

Bases: TestCase

Testing utils.

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_angle2xyz()[source]

Test the lonlat2xyz function.

test_lonlat2xyz()[source]

Test the lonlat2xyz function.

test_proj_units_to_meters()[source]

Test proj units to meters conversion.

test_xyz2angle()[source]

Test xyz2angle.

test_xyz2lonlat()[source]

Test xyz2lonlat.

satpy.tests.test_utils.test_chunk_pixel_size()[source]

Check the chunk pixel size computations.

satpy.tests.test_utils.test_chunk_size_limit()[source]

Check the chunk size limit computations.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_filename_dict()[source]

Test convertion of remote files to fsspec objects.

Case where filenames is a dictionary mapping readers and filenames.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_fsfile()[source]

Test convertion of remote files to fsspec objects.

Case where the some of the files are already FSFile objects.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_local_files()[source]

Test convertion of remote files to fsspec objects.

Case without scheme/protocol, which should default to plain filenames.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_mixed_sources()[source]

Test convertion of remote files to fsspec objects.

Case with mixed local and remote files.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_storage_options(open_files)[source]

Test convertion of remote files to fsspec objects.

Case with storage options given.

satpy.tests.test_utils.test_convert_remote_files_to_fsspec_windows_paths()[source]

Test convertion of remote files to fsspec objects.

Case where windows paths are used.

satpy.tests.test_utils.test_debug_on(caplog)[source]

Test that debug_on is working as expected.

satpy.tests.test_utils.test_logging_on_and_off(caplog)[source]

Test that switching logging on and off works.

satpy.tests.test_utils.test_make_fake_scene()[source]

Test the make_fake_scene utility.

Although the make_fake_scene utility is for internal testing purposes, it has grown sufficiently complex that it needs its own testing.

satpy.tests.test_utils.test_unify_chunks(shapes, chunks, dims, exp_unified)[source]

Test unify_chunks utility function.