Skip to content

TST: merge high_memory mark with single_cpu #46261

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 8 commits into from
Mar 11, 2022
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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
PYTEST_WORKERS: auto
PATTERN: "not slow and not network and not clipboard and not arm_slow"
PYTEST_TARGET: "pandas"
PANDAS_CI: "1"
steps:
- checkout
- run: ci/setup_env.sh
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pr:
variables:
PYTEST_WORKERS: auto
PYTEST_TARGET: pandas
PATTERN: "not slow and not high_memory and not db and not network and not single_cpu"
PATTERN: "not slow and not db and not network and not single_cpu"
PANDAS_CI: 1

jobs:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
python setup.py build_ext -q -j2 && \
python -m pip install --no-build-isolation -e . && \
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'

- task: PublishTestResults@2
Expand Down
8 changes: 0 additions & 8 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def pytest_collection_modifyitems(items, config):
only_slow = config.getoption("--only-slow")
skip_network = config.getoption("--skip-network")
skip_db = config.getoption("--skip-db")
run_high_memory = config.getoption("--run-high-memory")

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

if "high_memory" in item.keywords and not run_high_memory:
item.add_marker(
pytest.mark.skip(
"skipping high memory test since --run-high-memory was not set"
)
)


# Hypothesis
hypothesis.settings.register_profile(
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/frame/methods/test_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def test_rank_pct_true(self, method, exp):
tm.assert_frame_equal(result, expected)

@pytest.mark.single_cpu
@pytest.mark.high_memory
def test_pct_max_many_rows(self):
# GH 18271
df = DataFrame(
Expand Down
10 changes: 7 additions & 3 deletions pandas/tests/io/parser/test_c_parser_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
import numpy as np
import pytest

from pandas.compat import IS64
from pandas.compat import (
IS64,
is_ci_environment,
)
from pandas.errors import ParserError
import pandas.util._test_decorators as td

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


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

if parser.low_memory:
pytest.skip("not a high_memory test")
pytest.skip("not a low_memory test")

csv = StringIO("strings\n" + "\n".join(["x" * (1 << 20) for _ in range(2100)]))
df = parser.read_csv(csv)
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/series/methods/test_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ def test_rank_first_pct(dtype, ser, exp):


@pytest.mark.single_cpu
@pytest.mark.high_memory
def test_pct_max_many_rows():
# GH 18271
s = Series(np.arange(2**24 + 1))
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,6 @@ def test_too_many_ndims(self):
algos.rank(arr)

@pytest.mark.single_cpu
@pytest.mark.high_memory
def test_pct_max_many_rows(self):
# GH 18271
values = np.arange(2**24 + 1)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ filterwarnings = [
]
junit_family = "xunit2"
markers = [
"single_cpu: mark a test that should run on a single cpu only",
"single_cpu: tests that should run on a single cpu only",
"slow: mark a test as slow",
"network: mark a test as network",
"db: tests requiring a database (mysql or postgres)",
"high_memory: mark a test as a high-memory only",
"clipboard: mark a pd.read_clipboard test",
"arm_slow: mark a test as slow for arm64 architecture",
"arraymanager: mark a test to run with ArrayManager enabled",
Expand Down