MCPcopy Index your code
hub / github.com/pydata/xarray / test_keep_attrs

Function test_keep_attrs

xarray/tests/test_options.py:52–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def test_keep_attrs() -> None:
53 with pytest.raises(ValueError):
54 xarray.set_options(keep_attrs="invalid_str")
55 with xarray.set_options(keep_attrs=True):
56 assert OPTIONS["keep_attrs"]
57 with xarray.set_options(keep_attrs=False):
58 assert not OPTIONS["keep_attrs"]
59 with xarray.set_options(keep_attrs="default"):
60 assert _get_keep_attrs(default=True)
61 assert not _get_keep_attrs(default=False)
62
63
64def test_nested_options() -> None:

Callers

nothing calls this directly

Calls 1

_get_keep_attrsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…