MCPcopy
hub / github.com/pydata/xarray / test_append_overwrite_values

Method test_append_overwrite_values

xarray/tests/test_backends.py:1599–1608  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1597 assert_identical(data, actual)
1598
1599 def test_append_overwrite_values(self) -> None:
1600 # regression for GH1215
1601 data = create_test_data()
1602 with create_tmp_file(allow_cleanup_failure=False) as tmp_file:
1603 self.save(data, tmp_file, mode="w")
1604 data["var2"][:] = -999
1605 data["var9"] = data["var2"] * 3
1606 self.save(data[["var2", "var9"]], tmp_file, mode="a")
1607 with self.open(tmp_file) as actual:
1608 assert_identical(data, actual)
1609
1610 def test_append_with_invalid_dim_raises(self) -> None:
1611 data = create_test_data()

Callers

nothing calls this directly

Calls 5

assert_identicalFunction · 0.90
create_test_dataFunction · 0.85
create_tmp_fileFunction · 0.85
saveMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected