Skip to content

Commit 036e81e

Browse files
mroeschkeyehoshuadimarsky
authored andcommitted
TST: merge high_memory mark with single_cpu (pandas-dev#46261)
1 parent 402d07a commit 036e81e

File tree

8 files changed

+11
-18
lines changed

8 files changed

+11
-18
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
PYTEST_WORKERS: auto
1111
PATTERN: "not slow and not network and not clipboard and not arm_slow"
1212
PYTEST_TARGET: "pandas"
13+
PANDAS_CI: "1"
1314
steps:
1415
- checkout
1516
- run: ci/setup_env.sh

azure-pipelines.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pr:
1818
variables:
1919
PYTEST_WORKERS: auto
2020
PYTEST_TARGET: pandas
21-
PATTERN: "not slow and not high_memory and not db and not network and not single_cpu"
21+
PATTERN: "not slow and not db and not network and not single_cpu"
2222
PANDAS_CI: 1
2323

2424
jobs:
@@ -48,7 +48,7 @@ jobs:
4848
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
4949
python setup.py build_ext -q -j2 && \
5050
python -m pip install --no-build-isolation -e . && \
51-
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
51+
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
5252
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
5353
5454
- task: PublishTestResults@2

pandas/conftest.py

-8
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def pytest_collection_modifyitems(items, config):
106106
only_slow = config.getoption("--only-slow")
107107
skip_network = config.getoption("--skip-network")
108108
skip_db = config.getoption("--skip-db")
109-
run_high_memory = config.getoption("--run-high-memory")
110109

111110
marks = [
112111
(pytest.mark.slow, "slow", skip_slow, "--skip-slow"),
@@ -139,13 +138,6 @@ def pytest_collection_modifyitems(items, config):
139138
if only_slow and "slow" not in item.keywords:
140139
item.add_marker(pytest.mark.skip("skipping due to --only-slow"))
141140

142-
if "high_memory" in item.keywords and not run_high_memory:
143-
item.add_marker(
144-
pytest.mark.skip(
145-
"skipping high memory test since --run-high-memory was not set"
146-
)
147-
)
148-
149141

150142
# Hypothesis
151143
hypothesis.settings.register_profile(

pandas/tests/frame/methods/test_rank.py

-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ def test_rank_pct_true(self, method, exp):
328328
tm.assert_frame_equal(result, expected)
329329

330330
@pytest.mark.single_cpu
331-
@pytest.mark.high_memory
332331
def test_pct_max_many_rows(self):
333332
# GH 18271
334333
df = DataFrame(

pandas/tests/io/parser/test_c_parser_only.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
import numpy as np
1818
import pytest
1919

20-
from pandas.compat import IS64
20+
from pandas.compat import (
21+
IS64,
22+
is_ci_environment,
23+
)
2124
from pandas.errors import ParserError
2225
import pandas.util._test_decorators as td
2326

@@ -555,15 +558,16 @@ def test_read_tarfile(c_parser_only, csv_dir_path, tar_suffix):
555558
tm.assert_frame_equal(out, expected)
556559

557560

558-
@pytest.mark.high_memory
561+
@pytest.mark.single_cpu
562+
@pytest.mark.skipif(is_ci_environment(), reason="Too memory intensive for CI.")
559563
def test_bytes_exceed_2gb(c_parser_only):
560564
# see gh-16798
561565
#
562566
# Read from a "CSV" that has a column larger than 2GB.
563567
parser = c_parser_only
564568

565569
if parser.low_memory:
566-
pytest.skip("not a high_memory test")
570+
pytest.skip("not a low_memory test")
567571

568572
csv = StringIO("strings\n" + "\n".join(["x" * (1 << 20) for _ in range(2100)]))
569573
df = parser.read_csv(csv)

pandas/tests/series/methods/test_rank.py

-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ def test_rank_first_pct(dtype, ser, exp):
476476

477477

478478
@pytest.mark.single_cpu
479-
@pytest.mark.high_memory
480479
def test_pct_max_many_rows():
481480
# GH 18271
482481
s = Series(np.arange(2**24 + 1))

pandas/tests/test_algos.py

-1
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,6 @@ def test_too_many_ndims(self):
16591659
algos.rank(arr)
16601660

16611661
@pytest.mark.single_cpu
1662-
@pytest.mark.high_memory
16631662
def test_pct_max_many_rows(self):
16641663
# GH 18271
16651664
values = np.arange(2**24 + 1)

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ filterwarnings = [
4848
]
4949
junit_family = "xunit2"
5050
markers = [
51-
"single_cpu: mark a test that should run on a single cpu only",
51+
"single_cpu: tests that should run on a single cpu only",
5252
"slow: mark a test as slow",
5353
"network: mark a test as network",
5454
"db: tests requiring a database (mysql or postgres)",
55-
"high_memory: mark a test as a high-memory only",
5655
"clipboard: mark a pd.read_clipboard test",
5756
"arm_slow: mark a test as slow for arm64 architecture",
5857
"arraymanager: mark a test to run with ArrayManager enabled",

0 commit comments

Comments
 (0)