Skip to content

TST: Mark numba & threading tests as single cpu #53608

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 2 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pandas/tests/groupby/aggregate/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
)
import pandas._testing as tm

pytestmark = pytest.mark.single_cpu


@td.skip_if_no("numba")
def test_correct_function_signature():
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/groupby/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
)
import pandas._testing as tm

pytestmark = pytest.mark.single_cpu


@td.skip_if_no("numba")
@pytest.mark.filterwarnings("ignore")
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/groupby/transform/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
)
import pandas._testing as tm

pytestmark = pytest.mark.single_cpu


@td.skip_if_no("numba")
def test_correct_function_signature():
Expand Down
8 changes: 5 additions & 3 deletions pandas/tests/io/parser/test_multi_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

# We'll probably always skip these for pyarrow
# Maybe we'll add our own tests for pyarrow too
pytestmark = pytest.mark.usefixtures("pyarrow_skip")
pytestmark = [
pytest.mark.single_cpu,
pytest.mark.slow,
pytest.mark.usefixtures("pyarrow_skip"),
]


def _construct_dataframe(num_rows):
Expand All @@ -40,7 +44,6 @@ def _construct_dataframe(num_rows):
return df


@pytest.mark.slow
def test_multi_thread_string_io_read_csv(all_parsers):
# see gh-11786
parser = all_parsers
Expand Down Expand Up @@ -135,7 +138,6 @@ def reader(arg):
return final_dataframe


@pytest.mark.slow
def test_multi_thread_path_multipart_read_csv(all_parsers):
# see gh-11786
num_tasks = 4
Expand Down
4 changes: 1 addition & 3 deletions pandas/tests/io/pytables/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
ensure_clean_store,
)

pytestmark = [
pytest.mark.single_cpu,
]
pytestmark = pytest.mark.single_cpu


def test_categorical(setup_path):
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/io/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@ def __iter__(self) -> Iterator:
assert self.read_html(bad)

@pytest.mark.slow
@pytest.mark.single_cpu
def test_importcheck_thread_safety(self, datapath):
# see gh-16928

Expand Down
11 changes: 7 additions & 4 deletions pandas/tests/io/test_user_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
import pandas as pd
import pandas._testing as tm

pytestmark = pytest.mark.skipif(
is_ci_environment(),
reason="GH 45651: This test can hang in our CI min_versions build",
)
pytestmark = [
pytest.mark.single_cpu,
pytest.mark.skipif(
is_ci_environment(),
reason="GH 45651: This test can hang in our CI min_versions build",
),
]


class BaseUserAgentResponder(http.server.BaseHTTPRequestHandler):
Expand Down
16 changes: 9 additions & 7 deletions pandas/tests/window/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
)
import pandas._testing as tm

# TODO(GH#44584): Mark these as pytest.mark.single_cpu
pytestmark = pytest.mark.skipif(
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
reason="On GHA CI, Windows can fail with "
"'Windows fatal exception: stack overflow' "
"and macOS can timeout",
)
pytestmark = [
pytest.mark.single_cpu,
pytest.mark.skipif(
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
reason="On GHA CI, Windows can fail with "
"'Windows fatal exception: stack overflow' "
"and macOS can timeout",
),
]


@pytest.fixture(params=["single", "table"])
Expand Down
16 changes: 9 additions & 7 deletions pandas/tests/window/test_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
)
import pandas._testing as tm

# TODO(GH#44584): Mark these as pytest.mark.single_cpu
pytestmark = pytest.mark.skipif(
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
reason="On GHA CI, Windows can fail with "
"'Windows fatal exception: stack overflow' "
"and macOS can timeout",
)
pytestmark = [
pytest.mark.single_cpu,
pytest.mark.skipif(
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
reason="On GHA CI, Windows can fail with "
"'Windows fatal exception: stack overflow' "
"and macOS can timeout",
),
]


@td.skip_if_no("numba")
Expand Down