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

Function test_eval_error_invalid_assignment

xarray/tests/test_eval.py:337–342  ·  view source on GitHub ↗

Test error message when assignment target is invalid.

()

Source from the content-addressed store, hash-verified

335
336
337def test_eval_error_invalid_assignment() -> None:
338 """Test error message when assignment target is invalid."""
339 ds = Dataset({"a": ("x", [1, 2, 3])})
340 # "1 = a" should fail during parsing - can't assign to a literal
341 with pytest.raises(ValueError, match="Invalid"):
342 ds.eval("1 = a")
343
344
345def test_eval_error_dunder_access() -> None:

Callers

nothing calls this directly

Calls 2

evalMethod · 0.95
DatasetClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…