satpy.tests.test_readers module
Test classes and functions in the readers/__init__.py module.
- class satpy.tests.test_readers.TestDatasetDict(methodName='runTest')[source]
Bases:
TestCase
Test DatasetDict and its 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.
- class satpy.tests.test_readers.TestFSFile(methodName='runTest')[source]
Bases:
TestCase
Test the FSFile class.
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_fsfile_with_fs_open_file_abides_pathlike()[source]
Test that FSFile abides PathLike for fsspec OpenFile instances.
- test_fsfile_with_regular_filename_abides_pathlike()[source]
Test that FSFile abides PathLike for regular filenames.
- class satpy.tests.test_readers.TestFindFilesAndReaders[source]
Bases:
object
Test the find_files_and_readers utility function.
- test_no_parameters_both_atms_and_viirs(viirs_file, atms_file)[source]
Test with no limiting parameters when there area both atms and viirs files in the same directory.
- test_pending_old_reader_name_mapping()[source]
Test that requesting pending old reader names raises a warning.
- test_reader_name_matched_end_time(viirs_file)[source]
Test with end matching the filename.
End time in the middle of the file time should still match the file.
- test_reader_name_matched_start_end_time(viirs_file)[source]
Test with start and end time matching the filename.
- test_reader_name_matched_start_time(viirs_file)[source]
Test with start matching the filename.
Start time in the middle of the file time should still match the file.
- test_reader_name_unmatched_start_end_time(viirs_file)[source]
Test with start and end time matching the filename.
- class satpy.tests.test_readers.TestGroupFiles(methodName='runTest')[source]
Bases:
TestCase
Test the ‘group_files’ utility 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_large_time_threshold()[source]
Test what happens when the time threshold holds multiple files.
- test_multi_readers_empty_groups_missing_skip()[source]
Verify empty groups are skipped.
Verify that all groups lacking ABI are skipped, resulting in only three groups that are all non-empty for both instruments.
- test_multi_readers_empty_groups_passed()[source]
Verify that all groups are there, resulting in some that are empty.
- test_multi_readers_empty_groups_raises_filenotfounderror()[source]
Test behaviour on empty groups passing multiple readers.
Make sure it raises an exception, for there will be groups containing GLM but not ABI.
- test_multi_readers_invalid_parameter()[source]
Verify that invalid missing parameter raises ValueError.
- test_non_datetime_group_key()[source]
Test what happens when the start_time isn’t used for grouping.
- test_two_instruments_files()[source]
Test the behavior when two instruments files are provided.
This is undesired from a user point of view since we don’t want G16 and G17 files in the same Scene. Readers (like abi_l1b) are or can be configured to have specific group keys for handling these situations. Due to that this test forces the fallback group keys of (‘start_time’,).
- class satpy.tests.test_readers.TestReaderLoader(methodName='runTest')[source]
Bases:
TestCase
Test the load_readers function.
Assumes that the VIIRS SDR reader exists and works.
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_empty_filenames_as_dict()[source]
Test passing filenames as a dictionary with an empty list of filenames.
- test_filenames_as_dict_bad_reader()[source]
Test loading with filenames dict but one of the readers is bad.
- test_filenames_as_dict_with_reader()[source]
Test loading from a filenames dict with a single reader specified.
This can happen in the deprecated Scene behavior of passing a reader and a base_dir.
- class satpy.tests.test_readers.TestYAMLFiles(methodName='runTest')[source]
Bases:
TestCase
Test and analyze the reader configuration files.
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.