diff --git a/pandas/tests/groupby/aggregate/test_numba.py b/pandas/tests/groupby/aggregate/test_numba.py index d585cc1648c5a..10ed32a334d18 100644 --- a/pandas/tests/groupby/aggregate/test_numba.py +++ b/pandas/tests/groupby/aggregate/test_numba.py @@ -13,6 +13,8 @@ ) import pandas._testing as tm +pytestmark = pytest.mark.single_cpu + @td.skip_if_no("numba") def test_correct_function_signature(): diff --git a/pandas/tests/groupby/test_numba.py b/pandas/tests/groupby/test_numba.py index 4eb7b6a7b5bea..867bdbf583388 100644 --- a/pandas/tests/groupby/test_numba.py +++ b/pandas/tests/groupby/test_numba.py @@ -8,6 +8,8 @@ ) import pandas._testing as tm +pytestmark = pytest.mark.single_cpu + @td.skip_if_no("numba") @pytest.mark.filterwarnings("ignore") diff --git a/pandas/tests/groupby/transform/test_numba.py b/pandas/tests/groupby/transform/test_numba.py index 00ff391199652..557e132567a2e 100644 --- a/pandas/tests/groupby/transform/test_numba.py +++ b/pandas/tests/groupby/transform/test_numba.py @@ -11,6 +11,8 @@ ) import pandas._testing as tm +pytestmark = pytest.mark.single_cpu + @td.skip_if_no("numba") def test_correct_function_signature(): diff --git a/pandas/tests/io/parser/test_multi_thread.py b/pandas/tests/io/parser/test_multi_thread.py index ab278470934a5..562b99090dfab 100644 --- a/pandas/tests/io/parser/test_multi_thread.py +++ b/pandas/tests/io/parser/test_multi_thread.py @@ -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): @@ -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 @@ -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 diff --git a/pandas/tests/io/pytables/test_categorical.py b/pandas/tests/io/pytables/test_categorical.py index bb95762950d8e..b227c935c2b62 100644 --- a/pandas/tests/io/pytables/test_categorical.py +++ b/pandas/tests/io/pytables/test_categorical.py @@ -14,9 +14,7 @@ ensure_clean_store, ) -pytestmark = [ - pytest.mark.single_cpu, -] +pytestmark = pytest.mark.single_cpu def test_categorical(setup_path): diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index e54a23b1f8ef6..5c6c33de5ac5f 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -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 diff --git a/pandas/tests/io/test_user_agent.py b/pandas/tests/io/test_user_agent.py index 06051a81679fa..b9d3a20b2ecea 100644 --- a/pandas/tests/io/test_user_agent.py +++ b/pandas/tests/io/test_user_agent.py @@ -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): diff --git a/pandas/tests/window/test_numba.py b/pandas/tests/window/test_numba.py index dbafcf12513e0..f5ef6a00e0b32 100644 --- a/pandas/tests/window/test_numba.py +++ b/pandas/tests/window/test_numba.py @@ -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"]) diff --git a/pandas/tests/window/test_online.py b/pandas/tests/window/test_online.py index 875adf6cef4ac..5974de0ae4009 100644 --- a/pandas/tests/window/test_online.py +++ b/pandas/tests/window/test_online.py @@ -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")