class_docstr: Test the ViiNCBaseFileHandler reader.
class_docstr_tok: ["Test","the","ViiNCBaseFileHandler","reader","."]
docstr: Test the execution of the get_dataset function.
docstr_tok: ["Test","the","execution","of","the","get_dataset","function","."]
code: def test_dataset(self, po_, pi_, pc_):
      """Test the execution of the get_dataset function."""
      # Checks the correct execution of the get_dataset function with a valid file_key
      variable = self.reader.get_dataset(
          None,
          {
              "file_key": "data/measurement_data/tpw",
              "calibration": None,
          },
      )
      pc_.assert_not_called()
      pi_.assert_not_called()
      po_.assert_not_called()
  
      assert np.allclose(variable.values, np.ones((100, 10)))
      assert variable.dims == ("y", "x")
      assert variable.attrs["test_attr"] == "attr"
      assert variable.attrs["units"] is None
  
      # Checks the correct execution of the get_dataset function with a valid file_key
      # and required calibration and interpolation
      self.reader.get_dataset(
          None,
          {
              "file_key": "data/measurement_data/tpw",
              "calibration": "reflectance",
              "interpolate": True,
              "standard_name": "longitude",
          },
      )
      pc_.assert_called()
      pi_.assert_called()
      po_.assert_not_called()
  
      # Checks the correct execution of the get_dataset function with a valid file_key
      # and required orthorectification
      self.reader.orthorect = True
      self.reader.get_dataset(
          None,
          {
              "file_key": "data/measurement_data/tpw",
              "calibration": None,
              "orthorect_data": "test_orthorect_data",
          },
      )
      po_.assert_called()
  
      # Checks the correct execution of the get_dataset function with an invalid file_key
      invalid_dataset = self.reader.get_dataset(
          None, {"file_key": "test_invalid", "calibration": None}
      )
      # Checks that the function returns None
      assert invalid_dataset is None
  
      pc_.reset_mock()
      pi_.reset_mock()
      po_.reset_mock()
  
      # Checks the correct execution of the get_dataset function with a 'cached_longitude' file_key
      longitude = self.reader.get_dataset(
          None,
          {
              "file_key": "cached_longitude",
              "calibration": "reflectance",
              "interpolate": True,
          },
      )
      pc_.assert_not_called()
      pi_.assert_not_called()
      assert longitude[0, 0] == 1.0
  
      # Checks the correct execution of the get_dataset function with a 'cached_latitude' file_key
      latitude = self.reader.get_dataset(
          None, {"file_key": "cached_latitude", "calibration": None}
      )
      assert latitude[0, 0] == 2.0
  
      # Repeats some check with the reader where orthorectification and interpolation are inhibited
      # by means of the filetype_info flags
  
      pc_.reset_mock()
      pi_.reset_mock()
      po_.reset_mock()
  
      # Checks the correct execution of the get_dataset function with a valid file_key
      # and required calibration and interpolation
      self.reader_2.get_dataset(
          None,
          {
              "file_key": "data/measurement_data/tpw",
              "calibration": "reflectance",
              "interpolate": True,
              "standard_name": "longitude",
          },
      )
      pc_.assert_called()
      pi_.assert_not_called()
      po_.assert_not_called()
  
      # Checks the correct execution of the get_dataset function with a valid file_key
      # and required orthorectification
      self.reader_2.get_dataset(
          None,
          {
              "file_key": "data/measurement_data/tpw",
              "calibration": None,
              "orthorect_data": "test_orthorect_data",
          },
      )
      po_.assert_not_called()
  
      # Checks the correct execution of the get_dataset function with a 'cached_longitude' file_key
      longitude = self.reader_2.get_dataset(
          None, {"file_key": "cached_longitude", "calibration": None}
      )
      assert longitude[0, 0] == 100.0
  
      # Checks the correct execution of the get_dataset function with a 'cached_longitude' file_key
      # in a reader without defined longitude
      longitude = self.reader_3.get_dataset(
          None,
          {
              "file_key": "cached_longitude",
              "calibration": "reflectance",
              "interpolate": True,
          },
      )
      # Checks that the function returns None
      assert longitude is None
  
file_path: satpy/satpy/tests/reader_tests/test_vii_base_nc.py
imports: import datetime
  import os
  import unittest
  import uuid
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from netCDF4 import Dataset
  from satpy.readers.vii_base_nc import SCAN_ALT_TIE_POINTS, TIE_POINTS_FACTOR, ViiNCBaseFileHandler
label_desc: Use image node_id 6 for calling the TestViiNCBaseFileHandler obj's underlying member method code with example usage: obj.test_dataset(po_, pi_, pc_) without return types