Skip to content

Commit 382b793

Browse files
mroeschkeim-vinicius
authored and
im-vinicius
committed
TST: Mark numba & threading tests as single cpu (pandas-dev#53608)
* TST: Mark numba & threading tests as sinngle cpu * Update pandas/tests/window/test_online.py
1 parent 84dbd07 commit 382b793

File tree

9 files changed

+38
-24
lines changed

9 files changed

+38
-24
lines changed

pandas/tests/groupby/aggregate/test_numba.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
)
1414
import pandas._testing as tm
1515

16+
pytestmark = pytest.mark.single_cpu
17+
1618

1719
@td.skip_if_no("numba")
1820
def test_correct_function_signature():

pandas/tests/groupby/test_numba.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
)
99
import pandas._testing as tm
1010

11+
pytestmark = pytest.mark.single_cpu
12+
1113

1214
@td.skip_if_no("numba")
1315
@pytest.mark.filterwarnings("ignore")

pandas/tests/groupby/transform/test_numba.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
)
1212
import pandas._testing as tm
1313

14+
pytestmark = pytest.mark.single_cpu
15+
1416

1517
@td.skip_if_no("numba")
1618
def test_correct_function_signature():

pandas/tests/io/parser/test_multi_thread.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
# We'll probably always skip these for pyarrow
1717
# Maybe we'll add our own tests for pyarrow too
18-
pytestmark = pytest.mark.usefixtures("pyarrow_skip")
18+
pytestmark = [
19+
pytest.mark.single_cpu,
20+
pytest.mark.slow,
21+
pytest.mark.usefixtures("pyarrow_skip"),
22+
]
1923

2024

2125
def _construct_dataframe(num_rows):
@@ -40,7 +44,6 @@ def _construct_dataframe(num_rows):
4044
return df
4145

4246

43-
@pytest.mark.slow
4447
def test_multi_thread_string_io_read_csv(all_parsers):
4548
# see gh-11786
4649
parser = all_parsers
@@ -135,7 +138,6 @@ def reader(arg):
135138
return final_dataframe
136139

137140

138-
@pytest.mark.slow
139141
def test_multi_thread_path_multipart_read_csv(all_parsers):
140142
# see gh-11786
141143
num_tasks = 4

pandas/tests/io/pytables/test_categorical.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
ensure_clean_store,
1515
)
1616

17-
pytestmark = [
18-
pytest.mark.single_cpu,
19-
]
17+
pytestmark = pytest.mark.single_cpu
2018

2119

2220
def test_categorical(setup_path):

pandas/tests/io/test_html.py

+1
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,7 @@ def __iter__(self) -> Iterator:
13471347
assert self.read_html(bad)
13481348

13491349
@pytest.mark.slow
1350+
@pytest.mark.single_cpu
13501351
def test_importcheck_thread_safety(self, datapath):
13511352
# see gh-16928
13521353

pandas/tests/io/test_user_agent.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
import pandas as pd
1818
import pandas._testing as tm
1919

20-
pytestmark = pytest.mark.skipif(
21-
is_ci_environment(),
22-
reason="GH 45651: This test can hang in our CI min_versions build",
23-
)
20+
pytestmark = [
21+
pytest.mark.single_cpu,
22+
pytest.mark.skipif(
23+
is_ci_environment(),
24+
reason="GH 45651: This test can hang in our CI min_versions build",
25+
),
26+
]
2427

2528

2629
class BaseUserAgentResponder(http.server.BaseHTTPRequestHandler):

pandas/tests/window/test_numba.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
)
1818
import pandas._testing as tm
1919

20-
# TODO(GH#44584): Mark these as pytest.mark.single_cpu
21-
pytestmark = pytest.mark.skipif(
22-
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
23-
reason="On GHA CI, Windows can fail with "
24-
"'Windows fatal exception: stack overflow' "
25-
"and macOS can timeout",
26-
)
20+
pytestmark = [
21+
pytest.mark.single_cpu,
22+
pytest.mark.skipif(
23+
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
24+
reason="On GHA CI, Windows can fail with "
25+
"'Windows fatal exception: stack overflow' "
26+
"and macOS can timeout",
27+
),
28+
]
2729

2830

2931
@pytest.fixture(params=["single", "table"])

pandas/tests/window/test_online.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
)
1515
import pandas._testing as tm
1616

17-
# TODO(GH#44584): Mark these as pytest.mark.single_cpu
18-
pytestmark = pytest.mark.skipif(
19-
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
20-
reason="On GHA CI, Windows can fail with "
21-
"'Windows fatal exception: stack overflow' "
22-
"and macOS can timeout",
23-
)
17+
pytestmark = [
18+
pytest.mark.single_cpu,
19+
pytest.mark.skipif(
20+
is_ci_environment() and (is_platform_windows() or is_platform_mac()),
21+
reason="On GHA CI, Windows can fail with "
22+
"'Windows fatal exception: stack overflow' "
23+
"and macOS can timeout",
24+
),
25+
]
2426

2527

2628
@td.skip_if_no("numba")

0 commit comments

Comments
 (0)