satpy.tests.scene_tests.test_data_access module

Unit tests for data access methods and properties of the Scene class.

class satpy.tests.scene_tests.test_data_access.TestComputePersist[source]

Bases: object

Test methods that compute the internal data in some way.

pytestmark = [Mark(name='usefixtures', args=('include_test_etc',), kwargs={})]
test_chunk_pass_through()[source]

Test pass through of xarray chunk.

test_compute_pass_through()[source]

Test pass through of xarray compute.

test_persist_pass_through()[source]

Test pass through of xarray persist.

class satpy.tests.scene_tests.test_data_access.TestDataAccessMethods[source]

Bases: object

Test the scene class.

pytestmark = [Mark(name='usefixtures', args=('include_test_etc',), kwargs={})]
test_bad_setitem()[source]

Test setting an item wrongly.

test_contains()[source]

Test contains.

test_delitem()[source]

Test deleting an item.

test_getitem()[source]

Test __getitem__ with names only.

test_getitem_modifiers()[source]

Test __getitem__ with names and modifiers.

test_getitem_slices()[source]

Test __getitem__ with slices.

test_iter()[source]

Test iteration over the scene.

test_iter_by_area_swath()[source]

Test iterating by area on a swath.

test_sensor_names_added_datasets(include_reader, added_sensor, exp_sensors)[source]

Test that Scene sensor_names handles contained sensors properly.

test_sensor_names_readers(reader, filenames, exp_sensors)[source]

Test that Scene sensor_names handles different cases properly.

test_setitem()[source]

Test setting an item.

class satpy.tests.scene_tests.test_data_access.TestFinestCoarsestArea[source]

Bases: object

Test the Scene logic for finding the finest and coarsest area.

test_coarsest_finest_area_different_shape(coarse_area, fine_area)[source]

Test ‘coarsest_area’ and ‘finest_area’ methods for upright areas.

test_coarsest_finest_area_same_shape(area_def, shifted_area)[source]

Test that two areas with the same shape are consistently returned.

If two geometries (ex. two AreaDefinitions or two SwathDefinitions) have the same resolution (shape) but different coordinates, which one has the finer resolution would ultimately be determined by the semi-random ordering of the internal container of the Scene (a dict) if only pixel resolution was compared. This test makes sure that it is always the same object returned.

satpy.tests.scene_tests.test_data_access._create_coarest_finest_data_array(shape, area_def, attrs=None)[source]
satpy.tests.scene_tests.test_data_access._create_coarsest_finest_area_def(shape, extents)[source]
satpy.tests.scene_tests.test_data_access._create_coarsest_finest_swath_def(shape, extents, name_suffix)[source]