satpy.tests.test_dataset module

Test objects and functions in the dataset module.

class satpy.tests.test_dataset.TestCombineMetadata(methodName='runTest')[source]

Bases: TestCase

Test how metadata is combined.

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

Set up the test case.

test_average_datetimes()[source]

Test the average_datetimes helper function.

test_combine_arrays()[source]

Test the combine_metadata with arrays.

test_combine_dask_arrays()[source]

Test combining values that are dask arrays.

test_combine_empty_metadata()[source]

Test combining empty metadata.

test_combine_end_times()[source]

Test the combine_metadata with end times.

test_combine_end_times_with_none()[source]

Test the combine_metadata with end times when there’s a None included.

test_combine_identical_numpy_scalars()[source]

Test combining identical fill values.

test_combine_lists_different_size()[source]

Test combine metadata with different size lists.

test_combine_lists_identical()[source]

Test combine metadata with identical lists.

test_combine_lists_same_size_diff_values()[source]

Test combine metadata with lists with different values.

test_combine_nans()[source]

Test combining nan fill values.

test_combine_numpy_arrays()[source]

Test combining values that are numpy arrays.

test_combine_one_metadata_object()[source]

Test combining one metadata object.

test_combine_other_times()[source]

Test the combine_metadata with other time values than start or end times.

test_combine_real_world_mda()[source]

Test with real data.

test_combine_start_times()[source]

Test the combine_metadata with start times.

test_combine_start_times_with_none()[source]

Test the combine_metadata with start times when there’s a None included.

class satpy.tests.test_dataset.TestDataID(methodName='runTest')[source]

Bases: TestCase

Test DataID object creation and other methods.

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

Test that asking for a bad calibration fails.

test_basic_init()[source]

Test basic ways of creating a DataID.

test_compare_no_wl()[source]

Compare fully qualified wavelength ID to no wavelength ID.

test_create_less_modified_query()[source]

Test that modifications are popped correctly.

test_init_bad_modifiers()[source]

Test that modifiers are a tuple.

test_is_modified()[source]

Test that modifications are detected properly.

class satpy.tests.test_dataset.TestDataQuery[source]

Bases: object

Test case for data queries.

test_create_less_modified_query()[source]

Test that modifications are popped correctly.

test_dataquery()[source]

Test DataQuery objects.

test_is_modified()[source]

Test that modifications are detected properly.

class satpy.tests.test_dataset.TestIDQueryInteractions(methodName='runTest')[source]

Bases: TestCase

Test the interactions between DataIDs and DataQuerys.

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 = []
setUp() None[source]

Set up the test case.

test_hash_equality()[source]

Test hash equality.

test_id_filtering()[source]

Check did filtering.

test_inequality()[source]

Check (in)equality.

test_seviri_hrv_has_priority_over_vis008()[source]

Check that the HRV channel has priority over VIS008 when querying 0.8µm.

test_sort_dataids()[source]

Check dataid sorting.

test_sort_dataids_with_different_set_of_keys()[source]

Check sorting data ids when the query has a different set of keys.

satpy.tests.test_dataset.test_combine_dicts_close()[source]

Test combination of dictionaries whose values are close.

satpy.tests.test_dataset.test_combine_dicts_different(test_mda)[source]

Test combination of dictionaries differing in various ways.

satpy.tests.test_dataset.test_dataid()[source]

Test the DataID object.

satpy.tests.test_dataset.test_dataid_copy()[source]

Test copying a DataID.

satpy.tests.test_dataset.test_dataid_elements_picklable()[source]

Test individual elements of DataID can be pickled.

In some cases, like in the base reader classes, the elements of a DataID are extracted and stored in a separate dictionary. This means that the internal/fancy pickle handling of DataID does not play a part.

satpy.tests.test_dataset.test_dataid_equal_if_enums_different()[source]

Check that dataids with different enums but same items are equal.

satpy.tests.test_dataset.test_dataid_pickle()[source]

Test dataid pickling roundtrip.

satpy.tests.test_dataset.test_frequency_double_side_band_channel_containment()[source]

Test the frequency double side band object: check if one band contains another.

satpy.tests.test_dataset.test_frequency_double_side_band_channel_distances()[source]

Test the frequency double side band object: get the distance between two bands.

satpy.tests.test_dataset.test_frequency_double_side_band_channel_equality()[source]

Test the frequency double side band object: check if two bands are ‘equal’.

satpy.tests.test_dataset.test_frequency_double_side_band_channel_str()[source]

Test the frequency double side band object: test the band description.

satpy.tests.test_dataset.test_frequency_double_side_band_class_method_convert()[source]

Test the frequency double side band object: test the class method convert.

satpy.tests.test_dataset.test_frequency_quadruple_side_band_channel_containment()[source]

Test the frequency quadruple side band object: check if one band contains another.

satpy.tests.test_dataset.test_frequency_quadruple_side_band_channel_distances()[source]

Test the frequency quadruple side band object: get the distance between two bands.

satpy.tests.test_dataset.test_frequency_quadruple_side_band_channel_equality()[source]

Test the frequency quadruple side band object: check if two bands are ‘equal’.

satpy.tests.test_dataset.test_frequency_quadruple_side_band_channel_str()[source]

Test the frequency quadruple side band object: test the band description.

satpy.tests.test_dataset.test_frequency_quadruple_side_band_class_method_convert()[source]

Test the frequency double side band object: test the class method convert.

satpy.tests.test_dataset.test_frequency_range_channel_containment()[source]

Test the frequency range object: channel containment.

satpy.tests.test_dataset.test_frequency_range_channel_distances()[source]

Test the frequency range object: derive distances between bands.

satpy.tests.test_dataset.test_frequency_range_channel_equality()[source]

Test the frequency range object: check if two bands are ‘equal’.

satpy.tests.test_dataset.test_frequency_range_class_method_convert()[source]

Test the frequency range object: test the class method convert.

satpy.tests.test_dataset.test_frequency_range_class_method_str()[source]

Test the frequency range object: test the band description.

satpy.tests.test_dataset.test_wavelength_range()[source]

Test the wavelength range object.

satpy.tests.test_dataset.test_wavelength_range_cf_roundtrip()[source]

Test the wavelength range object roundtrip to cf.