class_docstr: Test the ViiNCBaseFileHandler reader.
class_docstr_tok: ["Test","the","ViiNCBaseFileHandler","reader","."]
docstr: Test the file product reading.
docstr_tok: ["Test","the","file","product","reading","."]
code: def test_file_reading(self):
      """Test the file product reading."""
      # Checks that the basic functionalities are correctly executed
      expected_start_time = datetime.datetime(
          year=2017,
          month=9,
          day=20,
          hour=17,
          minute=30,
          second=40,
          microsecond=888000,
      )
      assert self.reader.start_time == expected_start_time
  
      expected_end_time = datetime.datetime(
          year=2017,
          month=9,
          day=20,
          hour=17,
          minute=41,
          second=17,
          microsecond=555000,
      )
      assert self.reader.end_time == expected_end_time
  
      assert self.reader.spacecraft_name == "test_spacecraft"
      assert self.reader.sensor == "test_instrument"
      assert self.reader.ssp_lon is None
  
      # Checks that the global attributes are correctly read
      expected_global_attributes = {
          "filename": self.test_file_name,
          "start_time": expected_start_time,
          "end_time": expected_end_time,
          "spacecraft_name": "test_spacecraft",
          "ssp_lon": None,
          "sensor": "test_instrument",
          "filename_start_time": datetime.datetime(
              year=2017, month=9, day=20, hour=12, minute=30, second=30
          ),
          "filename_end_time": datetime.datetime(
              year=2017, month=9, day=20, hour=18, minute=30, second=50
          ),
          "platform_name": "test_spacecraft",
          "quality_group": {
              "duration_of_product": 1.0,
              "duration_of_data_present": 2.0,
              "duration_of_data_missing": 3.0,
              "duration_of_data_degraded": 4.0,
              "gap_start_time_utc": (5.0, 6.0),
              "gap_end_time_utc": (7.0, 8.0),
          },
      }
  
      global_attributes = self.reader._get_global_attributes()
      # Since the global_attributes dictionary contains numpy arrays,
      # it is not possible to peform a simple equality test
      # Must iterate on all keys to confirm that the dictionaries are equal
      assert (
          global_attributes.keys() == expected_global_attributes.keys()
      )
      for key in expected_global_attributes:
          if key not in ["quality_group"]:
              # Quality check must be valid for both iterable and not iterable elements
              try:
                  equal = all(
                      global_attributes[key]
                      == expected_global_attributes[key]
                  )
              except (TypeError, ValueError):
                  equal = (
                      global_attributes[key]
                      == expected_global_attributes[key]
                  )
              assert equal
          else:
              assert (
                  global_attributes[key].keys()
                  == expected_global_attributes[key].keys()
              )
              for inner_key in global_attributes[key]:
                  # Equality check must be valid for both iterable and not iterable elements
                  try:
                      equal = all(
                          global_attributes[key][inner_key]
                          == expected_global_attributes[key][inner_key]
                      )
                  except (TypeError, ValueError):
                      equal = (
                          global_attributes[key][inner_key]
                          == expected_global_attributes[key][inner_key]
                      )
                  assert equal
  
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 3 for calling the TestViiNCBaseFileHandler obj's underlying member method code with example usage: obj.test_file_reading() without return types