Skip to content

Commit

Permalink
add reproducibility test
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Jul 16, 2024
1 parent e32efc2 commit c1a3013
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/nested_pandas/nestedframe/test_nestedframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ def test_from_flat(index):
assert len(out_nf) == 5


def test_recover_from_flat():
"""test that going to_flat and then from_flat recovers the same df"""
nf = generate_data(5, 10, seed=1)

flat = nf["nested"].nest.to_flat()

nf2 = NestedFrame.from_flat(nf[["a", "b"]].join(flat), base_columns=["a", "b"], name="nested")

assert nf2.equals(nf)


def test_query():
"""Test that NestedFrame.query handles nested queries correctly"""

Expand Down

0 comments on commit c1a3013

Please sign in to comment.