Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs authored and teh-cmc committed Oct 11, 2024
1 parent a45c90f commit 27492ca
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions rerun_py/tests/unit/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ def test_using_index_values(self) -> None:
assert table.column("/points:Position3D")[1].values.equals(self.expected_pos0)
assert table.column("/points:Position3D")[2].values.equals(self.expected_pos1)

def test_filter_is_not_null(self) -> None:
view = self.recording.view(index="my_index", contents="points")

color = rr.dataframe.ComponentColumnSelector("points", rr.components.Color)

view = view.filter_is_not_null(color)

table = view.select().read_all()

# my_index, log_time, log_tick, points, colors
assert table.num_columns == 5
assert table.num_rows == 1

assert table.column("my_index")[0].equals(self.expected_index1[0])

# TODO(jleibs): Why is this failing. This is empty when it should have a value
assert table.column("/points:Position3D")[0].values.equals(self.expected_pos1)

def test_view_syntax(self) -> None:
good_content_expressions = [
{"points": rr.components.Position3D},
Expand Down

0 comments on commit 27492ca

Please sign in to comment.