Skip to content

fix(tests): skip modin tests if python version == 3.13 #1882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 6, 2025
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
from __future__ import annotations

import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs]
import sys

# Remove this conditional once modin is supported on Python 3.13
if sys.version_info < (3, 13):
import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs]
else:
raise RuntimeError("This test is not supported on Python 3.13")

import narwhals.stable.v1 as nw
import palmerpenguins # pyright: ignore[reportMissingTypeStubs]
import polars as pl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import re
import sys

import pytest
from playwright.sync_api import Page

from shiny.playwright import controller
Expand Down Expand Up @@ -39,6 +41,10 @@
]


@pytest.mark.skipif(
sys.version_info[:2] == (3, 13),
reason="Skipping on Python 3.13, since modin is not supported on 3.13",
)
def test_data_frame_data_type(
page: Page,
local_app: ShinyAppProc,
Expand Down
9 changes: 8 additions & 1 deletion tests/playwright/shiny/components/table/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
from __future__ import annotations

import modin.pandas as md # pyright: ignore[reportMissingTypeStubs]
import sys

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

Expand Down
6 changes: 6 additions & 0 deletions tests/playwright/shiny/components/table/test_table.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import re
import sys

import pytest
from playwright.sync_api import Page

from shiny.playwright import controller
from shiny.run import ShinyAppProc


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

Expand Down
Loading