class_docstr: Unit tests for DatasetWrapper class.
class_docstr_tok: ["Unit","tests","for","DatasetWrapper","class","."]
docstr: Test reassigning of coordinates.
  
  For some reason xarray does not always assign (y, x) coordinates to
  the high resolution datasets, although they have dimensions (y, x) and
  coordinates y and x exist. A dataset with these properties seems
  impossible to create (neither dropping, resetting or deleting
  coordinates seems to work). Instead use mock as a workaround.
docstr_tok: ["Test","reassigning","of","coordinates",".","For","some","reason","xarray","does","not","always","assign","(","y",",","x",")","coordinates","to","the","high","resolution","datasets",",","although","they","have","dimensions","(","y",",","x",")","and","coordinates","y","and","x","exist",".","A","dataset","with","these","properties","seems","impossible","to","create","(","neither","dropping",",","resetting","or","deleting","coordinates","seems","to","work",")",".","Instead","use","mock","as","a","workaround","."]
code: def test_reassign_coords(self):
      """Test reassigning of coordinates.
  
      For some reason xarray does not always assign (y, x) coordinates to
      the high resolution datasets, although they have dimensions (y, x) and
      coordinates y and x exist. A dataset with these properties seems
      impossible to create (neither dropping, resetting or deleting
      coordinates seems to work). Instead use mock as a workaround.
      """
      nc = mock.MagicMock(
          coords={"y": [0.1, 0.2], "x": [0.3, 0.4]}, dims=("y", "x")
      )
      nc.__getitem__.return_value = xr.DataArray(
          [[1, 2], [3, 4]], dims=("y", "x")
      )
      foo_exp = xr.DataArray(
          [[1, 2], [3, 4]],
          dims=("y", "x"),
          coords={"y": [0.1, 0.2], "x": [0.3, 0.4]},
      )
      ds = DatasetWrapper(nc)
      foo = ds["foo"]
      xr.testing.assert_equal(foo, foo_exp)
  
imports: from __future__ import annotations
  import os
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyproj import CRS
  from pyresample.geometry import AreaDefinition
  from satpy.readers.mviri_l1b_fiduceo_nc import ALTITUDE, EQUATOR_RADIUS, POLE_RADIUS, DatasetWrapper, FiduceoMviriEasyFcdrFileHandler, FiduceoMviriFullFcdrFileHandler
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 1 for calling the TestDatasetWrapper obj's underlying member method code with example usage: obj.test_reassign_coords() without return types