Skip to content

TST: Mark subprocess tests as single_cpu #54026

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 2 commits into from
Jul 7, 2023
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
2 changes: 2 additions & 0 deletions pandas/tests/io/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def test_gzip_reproducibility_file_object():
assert output == buffer.getvalue()


@pytest.mark.single_cpu
def test_with_missing_lzma():
"""Tests if import pandas works when lzma is not present."""
# https://github.com/pandas-dev/pandas/issues/27575
Expand All @@ -215,6 +216,7 @@ def test_with_missing_lzma():
subprocess.check_output([sys.executable, "-c", code], stderr=subprocess.PIPE)


@pytest.mark.single_cpu
def test_with_missing_lzma_runtime():
"""Tests if RuntimeError is hit when calling lzma without
having the module available.
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/plotting/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
dates = pytest.importorskip("matplotlib.dates")


@pytest.mark.single_cpu
def test_registry_mpl_resets():
# Check that Matplotlib converters are properly reset (see issue #27481)
code = (
Expand All @@ -63,6 +64,7 @@ def test_timtetonum_accepts_unicode():


class TestRegistration:
@pytest.mark.single_cpu
def test_dont_register_by_default(self):
# Run in subprocess to ensure a clean state
code = (
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def test_temp_setattr(with_exception):
assert ser.name == "first"


@pytest.mark.single_cpu
def test_str_size():
# GH#21758
a = "a"
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ def test_xarray_cftimeindex_nearest():
assert result == expected


@pytest.mark.single_cpu
def test_oo_optimizable():
# GH 21071
subprocess.check_call([sys.executable, "-OO", "-c", "import pandas"])


@pytest.mark.single_cpu
def test_oo_optimized_datetime_index_unpickle():
# GH 42866
subprocess.check_call(
Expand Down Expand Up @@ -200,6 +202,7 @@ def test_yaml_dump(df):
tm.assert_frame_equal(df, loaded2)


@pytest.mark.single_cpu
def test_missing_required_dependency():
# GH 23868
# To ensure proper isolation, we pass these flags
Expand Down