Skip to content

Commit

Permalink
Add a high-level test of query(), showing the resolution of #160
Browse files Browse the repository at this point in the history
  • Loading branch information
gitosaurus committed Oct 31, 2024
1 parent 75e3a17 commit 1a2a1d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/nested_pandas/nestedframe/test_nestedframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ def test_query():
# Check for the multi-layer error
with pytest.raises(ValueError):
base.query("a > 2 & nested.c > 1")
# Create another nest in order to further test the multi-layer error
base_2 = base.eval("nest2.c = nested.c + 1")
assert len(base_2.nested_columns) == 2
with pytest.raises(ValueError):
base_2.query("nested.c > 1 & nest2.c > 2")

# Test nested queries
nest_queried = base.query("nested.c > 1")
Expand Down

0 comments on commit 1a2a1d2

Please sign in to comment.