Skip to content

Commit

Permalink
Add a basic unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Dec 16, 2024
1 parent 8b08950 commit 53da877
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions rerun_py/tests/unit/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,19 @@ def test_view_syntax(self) -> None:
table = pa.Table.from_batches(batches, batches.schema)
assert table.num_columns == 3
assert table.num_rows == 0

def test_roundtrip_send(self) -> None:
df = self.recording.view(index="my_index", contents="/**").select().read_all()

with tempfile.TemporaryDirectory() as tmpdir:
rrd = tmpdir + "/tmp.rrd"

rr.init("rerun_example_test_recording")
rr.dataframe.send_dataframe(df)
rr.save(rrd)

round_trip_recording = rr.dataframe.load_recording(rrd)

df_round_trip = round_trip_recording.view(index="my_index", contents="/**").select().read_all()

assert df == df_round_trip

0 comments on commit 53da877

Please sign in to comment.