Skip to content

Commit 9c02050

Browse files
authored
CI: Run excel tests on single cpu for windows (pandas-dev#57486)
* CI: Run excel tests on single cpu for windows * Update
1 parent 2617822 commit 9c02050

8 files changed

+37
-0
lines changed

pandas/tests/io/excel/test_odf.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
import numpy as np
44
import pytest
55

6+
from pandas.compat import is_platform_windows
7+
68
import pandas as pd
79
import pandas._testing as tm
810

911
pytest.importorskip("odf")
1012

13+
if is_platform_windows():
14+
pytestmark = pytest.mark.single_cpu
15+
1116

1217
@pytest.fixture(autouse=True)
1318
def cd_and_set_engine(monkeypatch, datapath):

pandas/tests/io/excel/test_odswriter.py

+5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66

77
import pytest
88

9+
from pandas.compat import is_platform_windows
10+
911
import pandas as pd
1012
import pandas._testing as tm
1113

1214
from pandas.io.excel import ExcelWriter
1315

1416
odf = pytest.importorskip("odf")
1517

18+
if is_platform_windows():
19+
pytestmark = pytest.mark.single_cpu
20+
1621

1722
@pytest.fixture
1823
def ext():

pandas/tests/io/excel/test_openpyxl.py

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import numpy as np
66
import pytest
77

8+
from pandas.compat import is_platform_windows
9+
810
import pandas as pd
911
from pandas import DataFrame
1012
import pandas._testing as tm
@@ -17,6 +19,9 @@
1719

1820
openpyxl = pytest.importorskip("openpyxl")
1921

22+
if is_platform_windows():
23+
pytestmark = pytest.mark.single_cpu
24+
2025

2126
@pytest.fixture
2227
def ext():

pandas/tests/io/excel/test_readers.py

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from pandas._config import using_pyarrow_string_dtype
2020

21+
from pandas.compat import is_platform_windows
2122
import pandas.util._test_decorators as td
2223

2324
import pandas as pd
@@ -34,6 +35,9 @@
3435
StringArray,
3536
)
3637

38+
if is_platform_windows():
39+
pytestmark = pytest.mark.single_cpu
40+
3741
read_ext_params = [".xls", ".xlsx", ".xlsm", ".xlsb", ".ods"]
3842
engine_params = [
3943
# Add any engines to test here

pandas/tests/io/excel/test_style.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import pytest
66

7+
from pandas.compat import is_platform_windows
78
import pandas.util._test_decorators as td
89

910
from pandas import (
@@ -20,6 +21,9 @@
2021
# could compute styles and render to excel without jinja2, since there is no
2122
# 'template' file, but this needs the import error to delayed until render time.
2223

24+
if is_platform_windows():
25+
pytestmark = pytest.mark.single_cpu
26+
2327

2428
def assert_equal_cell_styles(cell1, cell2):
2529
# TODO: should find a better way to check equality

pandas/tests/io/excel/test_writers.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import numpy as np
1212
import pytest
1313

14+
from pandas.compat import is_platform_windows
1415
from pandas.compat._constants import PY310
1516
from pandas.compat._optional import import_optional_dependency
1617
import pandas.util._test_decorators as td
@@ -34,6 +35,9 @@
3435
)
3536
from pandas.io.excel._util import _writers
3637

38+
if is_platform_windows():
39+
pytestmark = pytest.mark.single_cpu
40+
3741

3842
def get_exp_unit(path: str) -> str:
3943
return "ns"

pandas/tests/io/excel/test_xlrd.py

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import numpy as np
44
import pytest
55

6+
from pandas.compat import is_platform_windows
7+
68
import pandas as pd
79
import pandas._testing as tm
810

@@ -11,6 +13,9 @@
1113

1214
xlrd = pytest.importorskip("xlrd")
1315

16+
if is_platform_windows():
17+
pytestmark = pytest.mark.single_cpu
18+
1419

1520
@pytest.fixture
1621
def read_ext_xlrd():

pandas/tests/io/excel/test_xlsxwriter.py

+5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
import pytest
44

5+
from pandas.compat import is_platform_windows
6+
57
from pandas import DataFrame
68
import pandas._testing as tm
79

810
from pandas.io.excel import ExcelWriter
911

1012
xlsxwriter = pytest.importorskip("xlsxwriter")
1113

14+
if is_platform_windows():
15+
pytestmark = pytest.mark.single_cpu
16+
1217

1318
@pytest.fixture
1419
def ext():

0 commit comments

Comments
 (0)