class_docstr: Main test class for the LI L2 reader.
class_docstr_tok: ["Main","test","class","for","the","LI","L2","reader","."]
docstr: Test the validity of a given (sector) variable.
docstr_tok: ["Test","the","validity","of","a","given","(","sector",")","variable","."]
code: def _test_dataset_variable(self, var_params, sname=""):
      """Test the validity of a given (sector) variable."""
      dataset_info, desc, dname, handler, shape, var_path = var_params
      res = self.get_variable_dataset(dataset_info, dname, handler)
      assert res.shape == shape
      assert res.dims[0] == "y"
      # Should retrieve content with fullname key:
      full_name = self.create_fullname_key(
          desc, var_path, dname, sname=sname
      )
      # Note: 'content' is not recognized as a valid member of the class below
      # since it is silently injected in from our patching fake base netcdf4 file handler class.
      # But for now, we don't need to actually extend the class itself as this is only
      # needed for testing.
      assert np.all(res.values == handler.content[full_name])
  
imports: import os
  from datetime import datetime
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from pyproj import Proj
  from satpy._config import config_search_paths
  from satpy.readers.li_base_nc import LINCFileHandler
  from satpy.readers.li_l2_nc import LI_GRID_SHAPE, LIL2NCFileHandler
  from satpy.readers.yaml_reader import load_yaml_configs
  from satpy.tests.reader_tests._li_test_utils import FakeLIFileHandlerBase, extract_filetype_info, get_product_schema, products_dict
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling the TestLIL2 obj's underlying member method code with example usage: obj._test_dataset_variable(var_params, sname) without return types