Skip to content

Commit

Permalink
add a test for necessary columns
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis committed Oct 23, 2023
1 parent 2eae215 commit f7f3c40
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
test_uproot_path = Path(__file__).parent / "test-uproot"


def test_necessary_buffers(
def test_report_necessary_buffers(
daa: dak.Array, tmpdir_factory: pytest.TempdirFactory
) -> None:
z = daa.points.x + daa.points.y
Expand Down Expand Up @@ -56,6 +56,20 @@ def test_necessary_buffers(
)


def test_report_necessary_columns(daa: dak.Array) -> None:
result = dak.min(daa.points.x, axis=1)
rep = dak.report_necessary_columns(result)
for k, v in rep.items():
assert sorted(["points.x"]) == sorted(v)

result = dak.zeros_like(daa.points.y)
rep = dak.report_necessary_columns(result)
for k, v in rep.items():
points, coord = list(v)[0].split(".")
assert points == "points"
assert coord in ["x", "y"]


def test_visualize_works(daa):
query = daa.points.x

Expand Down

0 comments on commit f7f3c40

Please sign in to comment.