datatree.testing.assert_identical#

datatree.testing.assert_identical(a: datatree.datatree.DataTree, b: datatree.datatree.DataTree, from_root: bool = True)[source][source]#

Like assert_equals, but will also check all dataset attributes and the attributes on all variables and coordinates.

By default this method will check the whole tree above the given node.

Parameters
  • a (xarray.DataTree) – The first object to compare.

  • b (xarray.DataTree) – The second object to compare.

  • from_root (bool, optional, default is True) – Whether or not to first traverse to the root of the trees before checking for isomorphism. If a & b have no parents then this has no effect.

See also

DataTree.identical, assert_isomorphic, assert_equal