Skip to content

Commit

Permalink
Unit test that would previously deadlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonspeed committed Oct 22, 2024
1 parent e8cfa44 commit bfc9488
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py-polars/tests/unit/dataframe/test_getitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,9 @@ def test_df_getitem_5343() -> None:
assert df[4, 5] == 1024
assert_frame_equal(df[4, [2]], pl.DataFrame({"foo2": [16]}))
assert_frame_equal(df[4, [5]], pl.DataFrame({"foo5": [1024]}))


def test_no_deadlock_19358():
s = pl.Series(["text"] * 100 + [1] * 100, dtype=pl.Object)
result = s.to_frame()[[0, -1]]
assert result[""].to_list() == ["text", 1]

0 comments on commit bfc9488

Please sign in to comment.