fre.cmor.tests.test_cmor_helpers_update_grid_label module
- fre.cmor.tests.test_cmor_helpers_update_grid_label.temp_json_file(tmp_path)
Fixture to create a temporary JSON file for testing.
- Args:
tmp_path: pytest’s fixture for temporary directories.
- Returns:
Path to the temporary JSON file.
- fre.cmor.tests.test_cmor_helpers_update_grid_label.test_invalid_json_file(tmp_path)
Test behavior when the input file is not a valid JSON file.
- fre.cmor.tests.test_cmor_helpers_update_grid_label.test_missing_grid_field(temp_json_file)
Test behavior when the ‘grid’ field is missing in the JSON file.
- fre.cmor.tests.test_cmor_helpers_update_grid_label.test_missing_grid_label_field(temp_json_file)
Test behavior when the ‘grid_label’ field is missing in the JSON file.
- fre.cmor.tests.test_cmor_helpers_update_grid_label.test_nonexistent_file()
Test behavior when the specified JSON file does not exist.
- fre.cmor.tests.test_cmor_helpers_update_grid_label.test_update_grid_label_and_grid_success(temp_json_file)
Test successful update of ‘grid_label’ and ‘grid’ fields.