Skip to content

Commit 70f2ed0

Browse files
authored
CI: Always run clipboard tests on GHA Linux (#45868)
1 parent 69b08d3 commit 70f2ed0

File tree

3 files changed

+33
-25
lines changed

3 files changed

+33
-25
lines changed

.github/workflows/posix.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525
strategy:
2626
matrix:
2727
settings: [
28-
[actions-38-downstream_compat.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29-
[actions-38-minimum_versions.yaml, "not clipboard", "", "", "", "", ""],
30-
[actions-38.yaml, "not slow and not network", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
31-
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
32-
[actions-38.yaml, "not clipboard", "", "", "", "", ""],
33-
[actions-pypy-38.yaml, "not slow and not clipboard", "", "", "", "", "--max-worker-restart 0"],
34-
[actions-39.yaml, "not clipboard", "", "", "", "", ""],
35-
[actions-310-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
36-
[actions-310.yaml, "not clipboard", "", "", "", "", ""],
28+
[actions-38-downstream_compat.yaml, "not slow and not network", "", "", "", "", ""],
29+
[actions-38-minimum_versions.yaml, "", "", "", "", "", ""],
30+
[actions-38.yaml, "not slow and not network", "language-pack-it", "it_IT.utf8", "it_IT.utf8", "", ""],
31+
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans", "zh_CN.utf8", "zh_CN.utf8", "", ""],
32+
[actions-38.yaml, "", "", "", "", "", ""],
33+
[actions-pypy-38.yaml, "not slow", "", "", "", "", "--max-worker-restart 0"],
34+
[actions-39.yaml, "", "", "", "", "", ""],
35+
[actions-310-numpydev.yaml, "not slow and not network", "", "", "", "deprecate", "-W error"],
36+
[actions-310.yaml, "", "", "", "", "", ""],
3737
]
3838
fail-fast: false
3939
env:
@@ -105,7 +105,8 @@ jobs:
105105
hashFiles('${{ env.ENV_FILE }}') }}
106106

107107
- name: Extra installs
108-
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 ${{ env.EXTRA_APT }}
108+
# xsel for clipboard tests
109+
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }}
109110

110111
- uses: conda-incubator/setup-miniconda@v2
111112
with:

ci/run_tests.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
2424
XVFB="xvfb-run "
2525
fi
2626

27-
PYTEST_CMD="${XVFB}pytest -r fEs -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
27+
PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
28+
29+
if [[ "$PATTERN" ]]; then
30+
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""
31+
fi
2832

2933
if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then
3034
PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/plotting/"
@@ -35,7 +39,13 @@ sh -c "$PYTEST_CMD"
3539

3640
if [[ "$PANDAS_DATA_MANAGER" != "array" ]]; then
3741
# The ArrayManager tests should have already been run by PYTEST_CMD if PANDAS_DATA_MANAGER was already set to array
38-
PYTEST_AM_CMD="PANDAS_DATA_MANAGER=array pytest -m \"$PATTERN and arraymanager\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE pandas"
42+
PYTEST_AM_CMD="PANDAS_DATA_MANAGER=array pytest -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE pandas"
43+
44+
if [[ "$PATTERN" ]]; then
45+
PYTEST_AM_CMD="$PYTEST_AM_CMD -m \"$PATTERN and arraymanager\""
46+
else
47+
PYTEST_AM_CMD="$PYTEST_AM_CMD -m \"arraymanager\""
48+
fi
3949

4050
echo $PYTEST_AM_CMD
4151
sh -c "$PYTEST_AM_CMD"

pandas/tests/io/test_clipboard.py

+10-13
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,13 @@ def test_invalid_encoding(self, df):
303303
def test_round_trip_valid_encodings(self, enc, df):
304304
self.check_round_trip_frame(df, encoding=enc)
305305

306-
307-
@pytest.mark.single
308-
@pytest.mark.clipboard
309-
@pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."])
310-
@pytest.mark.xfail(
311-
reason="Flaky test in multi-process CI environment: GH 44584",
312-
raises=AssertionError,
313-
strict=False,
314-
)
315-
def test_raw_roundtrip(data):
316-
# PR #25040 wide unicode wasn't copied correctly on PY3 on windows
317-
clipboard_set(data)
318-
assert data == clipboard_get()
306+
@pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."])
307+
@pytest.mark.xfail(
308+
reason="Flaky test in multi-process CI environment: GH 44584",
309+
raises=AssertionError,
310+
strict=False,
311+
)
312+
def test_raw_roundtrip(self, data):
313+
# PR #25040 wide unicode wasn't copied correctly on PY3 on windows
314+
clipboard_set(data)
315+
assert data == clipboard_get()

0 commit comments

Comments
 (0)