satpy.tests.reader_tests.test_li_l2_nc module

Unit tests on the LI L2 reader using the conventional mock constructed context.

class satpy.tests.reader_tests.test_li_l2_nc.TestLIL2[source]

Bases: object

Main test class for the LI L2 reader.

_test_dataset_sector_variables(settings, ds_desc, handler)[source]

Check the loading of the in sector variables.

_test_dataset_single_sector_variable(names, desc, settings, handler)[source]

Check the validity of a given sector variable.

_test_dataset_single_variable(vname, desc, settings, handler)[source]

Check the validity of a given variable.

_test_dataset_variable(var_params, sname='')[source]

Test the validity of a given (sector) variable.

_test_dataset_variables(settings, ds_desc, handler)[source]

Check the loading of the non in sector variables.

create_fullname_key(desc, var_path, vname, sname='')[source]

Create full name key for sector/non-sector content retrieval.

fake_handler()[source]

Wrap NetCDF4 FileHandler with our own fake handler.

generate_coords(filetype_infos, file_type_name, variable_name)[source]

Generate file handler and mimic coordinate generator call.

get_variable_dataset(dataset_info, dname, handler)[source]

Get the dataset of a given (sector) variable.

handler_with_area(filetype_infos, product_name)[source]

Create handler with area definition.

static param_provider(_filename, filename_info, _fileype_info)[source]

Provide parameters.

test_apply_accumulate_index_offset(filetype_infos)[source]

Should accumulate index offsets.

test_available_datasets(filetype_infos)[source]

Test available_datasets from li reader.

test_combine_info(filetype_infos)[source]

Test overridden combine_info.

test_coordinates_projection(filetype_infos)[source]

Should automatically generate lat/lon coords from projection data.

test_coords_generation(filetype_infos)[source]

Compare daskified coords generation results with non-daskified.

test_dataset_loading(filetype_infos)[source]

Test loading of all datasets from all products.

test_dataset_not_in_provided_dataset(filetype_infos)[source]

Test loading of a dataset that is not provided.

test_filename_infos(filetype_infos)[source]

Test settings retrieved from filename.

test_generate_coords_called_once(filetype_infos)[source]

Test that the method is called only once.

test_generate_coords_inverse_proj(filetype_infos)[source]

Test inverse_projection execution delayed until .values is called on the dataset.

test_generate_coords_not_called_on_non_accum_dataset(filetype_infos)[source]

Test that the method is not called when getting non-accum dataset.

test_generate_coords_not_called_on_non_coord_dataset(filetype_infos)[source]

Test that the method is not called when getting non-coord dataset.

test_generate_coords_on_accumulated_prods(filetype_infos)[source]

Test daskified generation of coords.

test_generate_coords_on_lon_lat(filetype_infos)[source]

Test getting lon/lat dataset on accumulated product.

test_get_area_def_acc_products(filetype_infos)[source]

Test retrieval of area def for accumulated products.

test_get_area_def_non_acc_products(filetype_infos)[source]

Test retrieval of area def for non-accumulated products.

test_get_first_valid_variable(filetype_infos)[source]

Test get_first_valid_variable from li reader.

test_get_first_valid_variable_not_found(filetype_infos)[source]

Test get_first_valid_variable from li reader if the variable is not found.

test_get_on_fci_grid_exc(filetype_infos)[source]

Test the execution of the get_on_fci_grid function for an accumulated gridded variable.

test_get_on_fci_grid_exc_non_accum(filetype_infos)[source]

Test the non-execution of the get_on_fci_grid function for a non-accumulated variable.

test_get_on_fci_grid_exc_non_grid(filetype_infos)[source]

Test the non-execution of the get_on_fci_grid function for an accumulated non-gridded variable.

test_milliseconds_to_timedelta(filetype_infos)[source]

Should covert milliseconds to timedelta.

test_report_datetimes(filetype_infos)[source]

Should report time variables as numpy datetime64 type and time durations as timedelta64.

test_swath_coordinates(filetype_infos)[source]

Test that swath coordinates are used correctly to assign coordinates to some datasets.

test_unregistered_dataset_loading(filetype_infos)[source]

Test loading of an unregistered dataset.

test_var_path_exists(filetype_infos)[source]

Test variable_path_exists from li reader.

test_variable_scaling(filetype_infos)[source]

Test automatic rescaling with offset and scale attributes.

test_with_area_def(filetype_infos)[source]

Test accumulated products data array with area definition.

test_with_area_def_pixel_placement(filetype_infos)[source]

Test the placements of pixel value with area definition.

test_with_area_def_vars_with_no_pattern(filetype_infos)[source]

Test accumulated products variable with no patterns and with area definition.

test_without_area_def(filetype_infos)[source]

Test accumulated products data array without area definition.

satpy.tests.reader_tests.test_li_l2_nc.std_filetype_infos()[source]

Return standard filetype info for LI L2.