Skip to content

Commit b8132ce

Browse files
committed
add cleanup session
1 parent 3e182d0 commit b8132ce

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/system/small/test_anywidget.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ def table_widget(paginated_bf_df: bf.dataframe.DataFrame):
8888
return widget
8989

9090

91+
@pytest.fixture(scope="module", autouse=True)
92+
def cleanup_session(session):
93+
"""Ensure session cleanup happens after all tests in this module."""
94+
yield
95+
# Force cleanup of all temporary resources if session is still active
96+
try:
97+
session.close()
98+
except Exception:
99+
# Session may already be closed by the global fixture
100+
pass
101+
102+
91103
def _assert_html_matches_pandas_slice(
92104
table_html: str,
93105
expected_pd_slice: pd.DataFrame,

0 commit comments

Comments
 (0)