Skip to content

Commit d6e6aa4

Browse files
mroeschkeim-vinicius
authored and
im-vinicius
committed
TST: Mark subprocess tests as single_cpu (pandas-dev#54026)
1 parent b533a22 commit d6e6aa4

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

pandas/tests/io/test_compression.py

+2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def test_gzip_reproducibility_file_object():
202202
assert output == buffer.getvalue()
203203

204204

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

217218

219+
@pytest.mark.single_cpu
218220
def test_with_missing_lzma_runtime():
219221
"""Tests if RuntimeError is hit when calling lzma without
220222
having the module available.

pandas/tests/plotting/test_converter.py

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
dates = pytest.importorskip("matplotlib.dates")
4444

4545

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

6465

6566
class TestRegistration:
67+
@pytest.mark.single_cpu
6668
def test_dont_register_by_default(self):
6769
# Run in subprocess to ensure a clean state
6870
code = (

pandas/tests/test_common.py

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def test_temp_setattr(with_exception):
233233
assert ser.name == "first"
234234

235235

236+
@pytest.mark.single_cpu
236237
def test_str_size():
237238
# GH#21758
238239
a = "a"

pandas/tests/test_downstream.py

+3
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ def test_xarray_cftimeindex_nearest():
119119
assert result == expected
120120

121121

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

126127

128+
@pytest.mark.single_cpu
127129
def test_oo_optimized_datetime_index_unpickle():
128130
# GH 42866
129131
subprocess.check_call(
@@ -200,6 +202,7 @@ def test_yaml_dump(df):
200202
tm.assert_frame_equal(df, loaded2)
201203

202204

205+
@pytest.mark.single_cpu
203206
def test_missing_required_dependency():
204207
# GH 23868
205208
# To ensure proper isolation, we pass these flags

0 commit comments

Comments
 (0)