Skip to content

Commit c17fc20

Browse files
committed
docs(tests): Add docstrings to anywidget tests
1 parent 9f16b31 commit c17fc20

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/unit/display/test_anywidget.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def handler(signum, frame):
8181

8282

8383
def test_css_contains_dark_mode_media_query():
84+
"""Test that the CSS for dark mode is loaded."""
8485
from bigframes.display.anywidget import TableWidget
8586

8687
mock_df = mock.create_autospec(bigframes.dataframe.DataFrame, instance=True)
@@ -100,6 +101,7 @@ def test_css_contains_dark_mode_media_query():
100101

101102
@pytest.fixture
102103
def mock_df():
104+
"""A mock DataFrame that can be used in multiple tests."""
103105
df = mock.create_autospec(bigframes.dataframe.DataFrame, instance=True)
104106
df.columns = ["col1", "col2"]
105107
df.dtypes = {"col1": "int64", "col2": "int64"}
@@ -122,6 +124,7 @@ def mock_df():
122124

123125

124126
def test_sorting_single_column(mock_df):
127+
"""Test that the widget can be sorted by a single column."""
125128
from bigframes.display.anywidget import TableWidget
126129

127130
with bigframes.option_context("display.repr_mode", "anywidget"):
@@ -140,6 +143,7 @@ def test_sorting_single_column(mock_df):
140143

141144

142145
def test_sorting_multi_column(mock_df):
146+
"""Test that the widget can be sorted by multiple columns."""
143147
from bigframes.display.anywidget import TableWidget
144148

145149
with bigframes.option_context("display.repr_mode", "anywidget"):
@@ -155,6 +159,7 @@ def test_sorting_multi_column(mock_df):
155159

156160

157161
def test_page_size_change_resets_sort(mock_df):
162+
"""Test that changing the page size resets the sorting."""
158163
from bigframes.display.anywidget import TableWidget
159164

160165
with bigframes.option_context("display.repr_mode", "anywidget"):

0 commit comments

Comments
 (0)