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

Function test_eval_error_dunder_access

xarray/tests/test_eval.py:345–349  ·  view source on GitHub ↗

Test error message when trying to access dunder attributes.

()

Source from the content-addressed store, hash-verified

343
344
345def test_eval_error_dunder_access() -> None:
346 """Test error message when trying to access dunder attributes."""
347 ds = Dataset({"a": ("x", [1, 2, 3])})
348 with pytest.raises(ValueError, match="private attributes"):
349 ds.eval("a.__class__")
350
351
352def test_eval_error_missing_method() -> 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…