Test that coordinates also take priority over builtins.
()
| 305 | |
| 306 | |
| 307 | def test_eval_coordinate_priority() -> None: |
| 308 | """Test that coordinates also take priority over builtins.""" |
| 309 | ds = Dataset( |
| 310 | {"data": ("x", [1.0, 2.0, 3.0])}, |
| 311 | coords={"sum": ("x", [10.0, 20.0, 30.0])}, # coordinate named 'sum' |
| 312 | ) |
| 313 | |
| 314 | # Coordinate should be accessible and take priority over builtin |
| 315 | result = ds.eval("data + sum") |
| 316 | expected = ds["data"] + ds.coords["sum"] |
| 317 | assert_equal(result, expected) |
| 318 | |
| 319 | |
| 320 | # Error message tests |
nothing calls this directly
no test coverage detected
searching dependent graphs…