satpy.tests.writer_tests.test_cf module
Tests for the CF writer.
- class satpy.tests.writer_tests.test_cf.EncodingUpdateTest(methodName='runTest')[source]
Bases:
TestCase
Test update of netCDF encoding.
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 = []
- class satpy.tests.writer_tests.test_cf.TempFile(suffix='.nc')[source]
Bases:
object
A temporary filename class.
Initialize.
- class satpy.tests.writer_tests.test_cf.TestCFWriter(methodName='runTest')[source]
Bases:
TestCase
Test case for CF writer.
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 = []
- get_test_attrs()[source]
Create some dataset attributes for testing purpose.
- Returns:
Attributes, encoded attributes, encoded and flattened attributes
- test_area2gridmapping()[source]
Test the conversion from pyresample area object to CF grid mapping.
- test_da2cf_one_dimensional_array()[source]
Test the conversion of an 1d DataArray to a CF-compatible DataArray.
- test_global_attr_default_history_and_Conventions()[source]
Test saving global attributes history and Conventions.
- test_global_attr_history_and_Conventions()[source]
Test saving global attributes history and Conventions.
- test_load_module_with_old_pyproj()[source]
Test that cf_writer can still be loaded with pyproj 1.9.6.
- test_save_dataset_a_digit()[source]
Test saving an array to netcdf/cf where dataset name starting with a digit.
- test_save_dataset_a_digit_no_prefix_include_attr()[source]
Test saving an array to netcdf/cf dataset name starting with a digit with no prefix include orig name.
- test_save_dataset_a_digit_prefix()[source]
Test saving an array to netcdf/cf where dataset name starting with a digit with prefix.
- test_save_dataset_a_digit_prefix_include_attr()[source]
Test saving an array to netcdf/cf where dataset name starting with a digit with prefix include orig name.
- class satpy.tests.writer_tests.test_cf.TestCFWriterData(methodName='runTest')[source]
Bases:
TestCase
Test case for CF writer where data arrays are needed.
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 = []
- class satpy.tests.writer_tests.test_cf.TestEncodingAttribute[source]
Bases:
TestEncodingKwarg
Test CF writer with ‘encoding’ dataset attribute.
- class satpy.tests.writer_tests.test_cf.TestEncodingKwarg[source]
Bases:
object
Test CF writer with ‘encoding’ keyword argument.
- satpy.tests.writer_tests.test_cf.test_da2cf_lonlat()[source]
Test correct da2cf encoding for area with lon/lat units.