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

Function test_eval_error_undefined_variable

xarray/tests/test_eval.py:323–327  ·  view source on GitHub ↗

Test error message when referencing an undefined variable.

()

Source from the content-addressed store, hash-verified

321
322
323def test_eval_error_undefined_variable() -> None:
324 """Test error message when referencing an undefined variable."""
325 ds = Dataset({"a": ("x", [1, 2, 3])})
326 with pytest.raises(NameError, match="undefined_var"):
327 ds.eval("undefined_var + a")
328
329
330def test_eval_error_syntax() -> 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…