class_docstr: Unit tests for SEVIRI netCDF reader.
class_docstr_tok: ["Unit","tests","for","SEVIRI","netCDF","reader","."]
docstr: Test getting the dataset.
docstr_tok: ["Test","getting","the","dataset","."]
code: def test_get_dataset(
      self,
      file_handler,
      channel,
      calibration,
      mask_bad_quality_scan_lines,
  ):
      """Test getting the dataset."""
      dataset_id = make_dataid(name=channel, calibration=calibration)
      key = channel_keys_dict[channel]
      dataset_info = {
          "nc_key": key,
          "units": "units",
          "wavelength": "wavelength",
          "standard_name": "standard_name",
      }
  
      file_handler.mask_bad_quality_scan_lines = (
          mask_bad_quality_scan_lines
      )
      res = file_handler.get_dataset(dataset_id, dataset_info)
  
      # Test scanline acquisition times
      expected = self._get_expected(
          channel=channel,
          calibration=calibration,
          calib_mode="NOMINAL",
          use_ext_coefs=False,
      )
      expected.attrs = {
          "orbital_parameters": {
              "satellite_actual_longitude": -3.541742131915741,
              "satellite_actual_latitude": -0.5203765167594427,
              "satellite_actual_altitude": 35783419.16135868,
              "satellite_nominal_longitude": -3.5,
              "satellite_nominal_latitude": 0.0,
              "projection_longitude": 0.0,
              "projection_latitude": 0.0,
              "projection_altitude": 35785831.0,
          },
          "time_parameters": {
              "nominal_start_time": datetime(2020, 1, 1, 0, 0),
              "nominal_end_time": datetime(2020, 1, 1, 0, 0),
              "observation_start_time": datetime(2020, 1, 1, 0, 0),
              "observation_end_time": datetime(2020, 1, 1, 0, 0),
          },
          "georef_offset_corrected": True,
          "platform_name": "Meteosat-11",
          "sensor": "seviri",
          "units": "units",
          "wavelength": "wavelength",
          "standard_name": "standard_name",
      }
      expected["acq_time"] = (
          "y",
          [
              np.datetime64("1958-01-02 00:00:01").astype(
                  "datetime64[ns]"
              ),
              np.datetime64("1958-01-02 00:00:02").astype(
                  "datetime64[ns]"
              ),
          ],
      )
      expected = expected[::-1]  # reader flips data upside down
      if mask_bad_quality_scan_lines:
          expected = file_handler._mask_bad_quality(
              expected, dataset_info
          )
  
      xr.testing.assert_allclose(res, expected)
  
      for key in [
          "sun_earth_distance_correction_applied",
          "sun_earth_distance_correction_factor",
      ]:
          res.attrs.pop(key, None)
      assert_attrs_equal(res.attrs, expected.attrs, tolerance=1e-4)
  
imports: from datetime import datetime
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from satpy.readers.seviri_l1b_nc import NCSEVIRIFileHandler
  from satpy.tests.reader_tests.test_seviri_base import ORBIT_POLYNOMIALS
  from satpy.tests.reader_tests.test_seviri_l1b_calibration import TestFileHandlerCalibrationBase
  from satpy.tests.utils import assert_attrs_equal, make_dataid
label_desc: Use image node_id 6 for calling the TestNCSEVIRIFileHandler obj's underlying member method code with example usage: obj.test_get_dataset(file_handler, channel, calibration, mask_bad_quality_scan_lines) without return types