Skip to content

Commit

Permalink
Unit test to verify we can inspect the schema contents
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Oct 15, 2024
1 parent 2a9ae36 commit 8fe0372
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rerun_py/tests/unit/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ def test_recording_info(self) -> None:
assert self.recording.application_id() == APP_ID
assert self.recording.recording_id() == str(RECORDING_ID)

def test_schema(self) -> None:
schema = self.recording.schema()

assert len(schema.index_columns()) == 3
# Points3DIndicator, Position3D, Color
assert len(schema.component_columns()) == 3

assert schema.index_columns()[0].name == "log_tick"
assert schema.index_columns()[1].name == "log_time"
assert schema.index_columns()[2].name == "my_index"
assert schema.component_columns()[0].entity_path == "/points"
assert schema.component_columns()[0].component_name == "rerun.components.Color"
assert schema.component_columns()[1].entity_path == "/points"
assert schema.component_columns()[1].component_name == "rerun.components.Points3DIndicator"
assert schema.component_columns()[2].entity_path == "/points"
assert schema.component_columns()[2].component_name == "rerun.components.Position3D"

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

Expand Down

0 comments on commit 8fe0372

Please sign in to comment.