diff --git a/satpy/tests/reader_tests/test_seadas_l2.py b/satpy/tests/reader_tests/test_seadas_l2.py index 01de26e96b..d3037e6b55 100644 --- a/satpy/tests/reader_tests/test_seadas_l2.py +++ b/satpy/tests/reader_tests/test_seadas_l2.py @@ -198,9 +198,12 @@ def _add_variable_to_netcdf_file(nc, var_name, var_info): fill_value=var_info.get("fill_value")) v[:] = var_info["data"] for attr_key, attr_val in var_info["attrs"].items(): + if isinstance(attr_val, (int, float)): + attr_val = v.dtype.type(attr_val) setattr(v, attr_key, attr_val) + class TestSEADAS: """Test the SEADAS L2 file reader."""