class_docstr: Test ASCAT Soil Mosture loader.
class_docstr_tok: ["Test","ASCAT","Soil","Mosture","loader","."]
docstr: Test loading data.
docstr_tok: ["Test","loading","data","."]
code: def test_scene_dataset_values(self):
      """Test loading data."""
      from satpy import Scene
  
      fname = os.path.join(self.base_dir, FILENAME)
      scn = Scene(
          reader="ascat_l2_soilmoisture_bufr", filenames=[fname]
      )
      for name in scn.available_dataset_names():
          scn.load([name])
          loaded_values = scn[name].values
          fill_value = scn[name].attrs["fill_value"]
          # replace nans in data loaded from file with the fill value defined in the .yaml
          # to make them comparable
          loaded_values_nan_filled = np.nan_to_num(
              loaded_values, nan=fill_value
          )
          key = scn[name].attrs["key"]
          original_values = MSG[key]
          # this makes each assertion below a separate test from unittest's point of view
          # (note: if all subtests pass, they will count as one test)
          with self.subTest(msg="Test failed for dataset: " + name):
              assert np.allclose(
                  original_values, loaded_values_nan_filled
              )
  
file_path: satpy/satpy/tests/reader_tests/test_ascat_l2_soilmoisture_bufr.py
imports: import os
  import sys
  import unittest
  from datetime import datetime
  import numpy
label_desc: Use image node_id 5 for calling the TesitAscatL2SoilmoistureBufr obj's underlying member method code with example usage: obj.test_scene_dataset_values() without return types