1515from unittest import mock
1616
1717import pandas as pd
18+ import pyarrow as pa
1819import pytest
1920
2021from bigframes .core import blocks
@@ -28,8 +29,7 @@ def mock_session():
2829
2930
3031def test_pd_index_to_array_value_with_empty_index_creates_no_columns (mock_session ):
31- """
32- Tests that `_pd_index_to_array_value` with an empty pandas Index creates
32+ """Tests that `_pd_index_to_array_value` with an empty pandas Index creates
3333 an ArrayValue with the expected number of columns (index level + offset).
3434 """
3535 empty_index = pd .Index ([], name = "test" )
@@ -41,8 +41,7 @@ def test_pd_index_to_array_value_with_empty_index_creates_no_columns(mock_sessio
4141
4242
4343def test_pd_index_to_array_value_with_empty_multiindex_creates_no_columns (mock_session ):
44- """
45- Tests that `_pd_index_to_array_value` with an empty pandas MultiIndex creates
44+ """Tests that `_pd_index_to_array_value` with an empty pandas MultiIndex creates
4645 an ArrayValue with the expected number of columns (index levels + offset).
4746 """
4847 empty_index = pd .MultiIndex .from_arrays ([[], []], names = ["a" , "b" ])
@@ -54,11 +53,7 @@ def test_pd_index_to_array_value_with_empty_multiindex_creates_no_columns(mock_s
5453
5554
5655def test_unpivot_with_empty_row_labels (mock_session ):
57- """
58- Tests that `unpivot` handles an empty `row_labels` index correctly by producing 0 rows.
59- """
60- import pyarrow as pa
61-
56+ """Tests that `unpivot` handles an empty `row_labels` index correctly by producing 0 rows."""
6257 # Create a dummy ArrayValue
6358 df = pd .DataFrame ({"a" : [1 , 2 , 3 ], "b" : [4 , 5 , 6 ]})
6459 pa_table = pa .Table .from_pandas (df )
0 commit comments