class_docstr: Test various SAFE SAR L2 OCN file handlers.
docstr: Set up the tests.
docstr_tok: ["Set","up","the","tests","."]
code: def setUp(self, xr_):
      """Set up the tests."""
      from satpy.readers.safe_sar_l2_ocn import SAFENC
  
      self.channels = [
          "owiWindSpeed",
          "owiLon",
          "owiLat",
          "owiHs",
          "owiNrcs",
          "foo",
          "owiPolarisationName",
          "owiCalConstObsi",
      ]
      # Mock file access to return a fake dataset.
      self.dummy3d = np.zeros((2, 2, 1))
      self.dummy2d = np.zeros((2, 2))
      self.dummy1d = np.zeros((2))
      self.band = 1
      self.nc = xr.Dataset(
          {
              "owiWindSpeed": xr.DataArray(
                  self.dummy2d,
                  dims=("owiAzSize", "owiRaSize"),
                  attrs={"_FillValue": np.nan},
              ),
              "owiLon": xr.DataArray(
                  data=self.dummy2d, dims=("owiAzSize", "owiRaSize")
              ),
              "owiLat": xr.DataArray(
                  data=self.dummy2d, dims=("owiAzSize", "owiRaSize")
              ),
              "owiHs": xr.DataArray(
                  data=self.dummy3d,
                  dims=("owiAzSize", "owiRaSize", "oswPartition"),
              ),
              "owiNrcs": xr.DataArray(
                  data=self.dummy3d,
                  dims=("owiAzSize", "owiRaSize", "oswPolarization"),
              ),
              "foo": xr.DataArray(
                  self.dummy2d, dims=("owiAzSize", "owiRaSize")
              ),
              "owiPolarisationName": xr.DataArray(
                  self.dummy1d, dims=("owiPolarisation")
              ),
              "owiCalConstObsi": xr.DataArray(
                  self.dummy1d, dims=("owiIncSize")
              ),
          },
          attrs={"_FillValue": np.nan, "missionName": "S1A"},
      )
      xr_.open_dataset.return_value = self.nc
  
      # Instantiate reader using the mocked open_dataset() method. Also, make
      # the reader believe all abstract methods have been implemented.
      self.reader = SAFENC(
          filename="dummy",
          filename_info={
              "start_time": 0,
              "end_time": 0,
              "fstart_time": 0,
              "fend_time": 0,
              "polarization": "vv",
          },
          filetype_info={},
      )
  
file_path: satpy/satpy/tests/reader_tests/test_safe_sar_l2_ocn.py
imports: import unittest
  import unittest.mock
  import numpy
  import xarray
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 1 for calling the TestSAFENC obj's underlying member method code with example usage: obj.setUp(xr_) without return types