satpy.tests.test_config module

Test objects and functions in the satpy.config module.

class satpy.tests.test_config.TestBuiltinAreas(methodName='runTest')[source]

Bases: TestCase

Test that the builtin areas are all valid.

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

Test all areas have valid projections with pyproj.

test_areas_rasterio()[source]

Test all areas have valid projections with rasterio.

class satpy.tests.test_config.TestConfigObject[source]

Bases: object

Test basic functionality of the central config object.

test_bad_str_config_path()[source]

Test that a str config path isn’t allowed.

test_config_path_multiple()[source]

Test that multiple config paths are accepted.

test_config_path_multiple_load()[source]

Test that config paths from subprocesses load properly.

Satpy modifies the config path environment variable when it is imported. If Satpy is imported again from a subprocess then it should be able to parse this modified variable.

test_custom_config_file()[source]

Test adding a custom configuration file using SATPY_CONFIG.

test_deprecated_env_vars()[source]

Test that deprecated variables are mapped to new config.

test_tmp_dir_is_writable()[source]

Check that the default temporary directory is writable.

class satpy.tests.test_config.TestPluginsConfigs[source]

Bases: object

Test that plugins are working.

setup_method()[source]

Set up the test.

test_get_plugin_configs(fake_composite_plugin_etc_path)[source]

Check that the plugin configs are looked for.

test_load_entry_point_composite(fake_composite_plugin_etc_path)[source]

Test that composites can be loaded from plugin entry points.

test_plugin_enhancements_generic_sensor(fake_enh_plugin_etc_path, sensor_name, exp_result)[source]

Test that enhancements from a plugin are available.

test_plugin_reader_available_readers(fake_reader_plugin_etc_path)[source]

Test that readers can be loaded from plugin entry points.

test_plugin_reader_configs(fake_reader_plugin_etc_path, specified_reader)[source]

Test that readers can be loaded from plugin entry points.

test_plugin_writer_available_writers(fake_writer_plugin_etc_path)[source]

Test that readers can be loaded from plugin entry points.

test_plugin_writer_configs(fake_writer_plugin_etc_path, specified_writer)[source]

Test that writers can be loaded from plugin entry points.

satpy.tests.test_config.fake_composite_plugin_etc_path(tmp_path: Path) Iterator[Path][source]

Create a fake plugin entry point with a fake compositor YAML configuration file.

satpy.tests.test_config.fake_enh_plugin_etc_path(tmp_path: Path) Iterator[Path][source]

Create a fake plugin entry point with a fake enhancement YAML configure files.

This creates a fake_sensor.yaml and generic.yaml enhancement configuration.

satpy.tests.test_config.fake_plugin_etc_path(tmp_path: Path, entry_point_names: dict[str, list[str]]) Iterator[Path][source]

Create a fake satpy plugin entry point.

This mocks the necessary methods to trick Satpy into thinking a plugin package is installed and has made a satpy plugin available.

satpy.tests.test_config.fake_reader_plugin_etc_path(tmp_path: Path) Iterator[Path][source]

Create a fake plugin entry point with a fake reader YAML configuration file.

satpy.tests.test_config.fake_writer_plugin_etc_path(tmp_path: Path) Iterator[Path][source]

Create a fake plugin entry point with a fake writer YAML configuration file.

satpy.tests.test_config.test_is_writable()[source]

Test writable directory check.