class_docstr: Main test class for the LI L2 reader.
class_docstr_tok: ["Main","test","class","for","the","LI","L2","reader","."]
docstr: Test that swath coordinates are used correctly to assign coordinates to some datasets.
docstr_tok: ["Test","that","swath","coordinates","are","used","correctly","to","assign","coordinates","to","some","datasets","."]
code: def test_swath_coordinates(self, filetype_infos):
      """Test that swath coordinates are used correctly to assign coordinates to some datasets."""
      handler = LIL2NCFileHandler(
          "filename",
          {},
          extract_filetype_info(filetype_infos, "li_l2_lfl_nc"),
      )
  
      # Check latitude:
      dsid = make_dataid(name="latitude")
      dset = handler.get_dataset(dsid)
      assert "coordinates" not in dset.attrs
  
      # get_area_def should raise exception:
      with pytest.raises(NotImplementedError):
          handler.get_area_def(dsid)
  
      # Check radiance:
      dsid = make_dataid(name="radiance")
      dset = handler.get_dataset(dsid)
      assert "coordinates" in dset.attrs
      assert dset.attrs["coordinates"][0] == "longitude"
      assert dset.attrs["coordinates"][1] == "latitude"
  
      with pytest.raises(NotImplementedError):
          handler.get_area_def(dsid)
  
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 18 for calling the TestLIL2 obj's underlying member method code with example usage: obj.test_swath_coordinates(filetype_infos) without return types