Skip to content

Commit b8b6d24

Browse files
authored
fix(tests): skip modin tests if python version == 3.13 (#1882)
1 parent e450da5 commit b8b6d24

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

tests/playwright/shiny/components/data_frame/data_type/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
from __future__ import annotations
22

3-
import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs]
3+
import sys
4+
5+
# Remove this conditional once modin is supported on Python 3.13
6+
if sys.version_info < (3, 13):
7+
import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs]
8+
else:
9+
raise RuntimeError("This test is not supported on Python 3.13")
10+
411
import narwhals.stable.v1 as nw
512
import palmerpenguins # pyright: ignore[reportMissingTypeStubs]
613
import polars as pl

tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import re
2+
import sys
23

4+
import pytest
35
from playwright.sync_api import Page
46

57
from shiny.playwright import controller
@@ -39,6 +41,10 @@
3941
]
4042

4143

44+
@pytest.mark.skipif(
45+
sys.version_info[:2] == (3, 13),
46+
reason="Skipping on Python 3.13, since modin is not supported on 3.13",
47+
)
4248
def test_data_frame_data_type(
4349
page: Page,
4450
local_app: ShinyAppProc,

tests/playwright/shiny/components/table/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
from __future__ import annotations
22

3-
import modin.pandas as md # pyright: ignore[reportMissingTypeStubs]
3+
import sys
4+
5+
# Remove this conditional once modin is supported on Python 3.13
6+
if sys.version_info < (3, 13):
7+
import modin.pandas as md # pyright: ignore[reportMissingTypeStubs]
8+
else:
9+
# This block executes for Python 3.13 and above
10+
raise RuntimeError("This test is not supported on Python 3.13")
411
import narwhals.stable.v1 as nw
512
import palmerpenguins # pyright: ignore[reportMissingTypeStubs]
613

tests/playwright/shiny/components/table/test_table.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import re
2+
import sys
23

4+
import pytest
35
from playwright.sync_api import Page
46

57
from shiny.playwright import controller
68
from shiny.run import ShinyAppProc
79

810

11+
@pytest.mark.skipif(
12+
sys.version_info[:2] == (3, 13),
13+
reason="Skipping on Python 3.13, since modin is not supported on 3.13",
14+
)
915
def test_table_data_support(page: Page, local_app: ShinyAppProc) -> None:
1016
page.goto(local_app.url)
1117

0 commit comments

Comments
 (0)