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

Method test_stack_errors

xarray/tests/test_variable.py:1754–1760  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1752 assert_identical(actual, expected)
1753
1754 def test_stack_errors(self):
1755 v = Variable(["x", "y"], [[0, 1], [2, 3]], {"foo": "bar"})
1756
1757 with pytest.raises(ValueError, match=r"invalid existing dim"):
1758 v.stack(z=("x1",))
1759 with pytest.raises(ValueError, match=r"cannot create a new dim"):
1760 v.stack(x=("x",))
1761
1762 def test_unstack(self):
1763 v = Variable("z", [0, 1, 2, 3], {"foo": "bar"})

Callers

nothing calls this directly

Calls 2

stackMethod · 0.95
VariableClass · 0.90

Tested by

no test coverage detected