class_docstr: Test the Scene logic for finding the finest and coarsest area.
class_docstr_tok: ["Test","the","Scene","logic","for","finding","the","finest","and","coarsest","area","."]
docstr: Test that two areas with the same shape are consistently returned.
  
  If two geometries (ex. two AreaDefinitions or two SwathDefinitions)
  have the same resolution (shape) but different
  coordinates, which one has the finer resolution would ultimately be
  determined by the semi-random ordering of the internal container of
  the Scene (a dict) if only pixel resolution was compared. This test
  makes sure that it is always the same object returned.
docstr_tok: ["Test","that","two","areas","with","the","same","shape","are","consistently","returned",".","If","two","geometries","(","ex",".","two","AreaDefinitions","or","two","SwathDefinitions",")","have","the","same","resolution","(","shape",")","but","different","coordinates",",","which","one","has","the","finer","resolution","would","ultimately","be","determined","by","the","semi-random","ordering","of","the","internal","container","of","the","Scene","(","a","dict",")","if","only","pixel","resolution","was","compared",".","This","test","makes","sure","that","it","is","always","the","same","object","returned","."]
code: def test_coarsest_finest_area_same_shape(
      self, area_def, shifted_area
  ):
      """Test that two areas with the same shape are consistently returned.
  
      If two geometries (ex. two AreaDefinitions or two SwathDefinitions)
      have the same resolution (shape) but different
      coordinates, which one has the finer resolution would ultimately be
      determined by the semi-random ordering of the internal container of
      the Scene (a dict) if only pixel resolution was compared. This test
      makes sure that it is always the same object returned.
  
      """
      ds1 = _create_coarest_finest_data_array(area_def.shape, area_def)
      ds2 = _create_coarest_finest_data_array(
          area_def.shape, shifted_area
      )
      scn = Scene()
      scn["ds1"] = ds1
      scn["ds2"] = ds2
      course_area1 = scn.coarsest_area()
  
      scn = Scene()
      scn["ds2"] = ds2
      scn["ds1"] = ds1
      coarse_area2 = scn.coarsest_area()
      # doesn't matter what order they were added, this should be the same area
      assert coarse_area2 is course_area1
  
imports: import math
  import numpy
  import pytest
  import xarray
  from dask import array
  from satpy import Scene
  from satpy.dataset.dataid import default_id_keys_config
  from satpy.tests.utils import FAKE_FILEHANDLER_END, FAKE_FILEHANDLER_START, make_cid, make_dataid
label_desc: Use image node_id 2 for calling the TestFinestCoarsestArea obj's underlying member method code with example usage: obj.test_coarsest_finest_area_same_shape(area_def, shifted_area) without return types