Skip to content

Backport PR #45868 on branch 1.4.x (CI: Always run clipboard tests on GHA Linux) #45887

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
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
21 changes: 11 additions & 10 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
strategy:
matrix:
settings: [
[actions-38-downstream_compat.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
[actions-38-minimum_versions.yaml, "not clipboard", "", "", "", "", ""],
[actions-38.yaml, "not slow and not network", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
[actions-38.yaml, "not clipboard", "", "", "", "", ""],
[actions-pypy-38.yaml, "not slow and not clipboard", "", "", "", "", "--max-worker-restart 0"],
[actions-39.yaml, "not clipboard", "", "", "", "", ""],
[actions-310-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
[actions-310.yaml, "not clipboard", "", "", "", "", ""],
[actions-38-downstream_compat.yaml, "not slow and not network", "", "", "", "", ""],
[actions-38-minimum_versions.yaml, "", "", "", "", "", ""],
[actions-38.yaml, "not slow and not network", "language-pack-it", "it_IT.utf8", "it_IT.utf8", "", ""],
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans", "zh_CN.utf8", "zh_CN.utf8", "", ""],
[actions-38.yaml, "", "", "", "", "", ""],
[actions-pypy-38.yaml, "not slow", "", "", "", "", "--max-worker-restart 0"],
[actions-39.yaml, "", "", "", "", "", ""],
[actions-310-numpydev.yaml, "not slow and not network", "", "", "", "deprecate", "-W error"],
[actions-310.yaml, "", "", "", "", "", ""],
]
fail-fast: false
env:
Expand Down Expand Up @@ -105,7 +105,8 @@ jobs:
hashFiles('${{ env.ENV_FILE }}') }}

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

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
14 changes: 12 additions & 2 deletions ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
XVFB="xvfb-run "
fi

PYTEST_CMD="${XVFB}pytest -r fEs -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"

if [[ "$PATTERN" ]]; then
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""
fi

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

if [[ "$PANDAS_DATA_MANAGER" != "array" ]]; then
# The ArrayManager tests should have already been run by PYTEST_CMD if PANDAS_DATA_MANAGER was already set to array
PYTEST_AM_CMD="PANDAS_DATA_MANAGER=array pytest -m \"$PATTERN and arraymanager\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE pandas"
PYTEST_AM_CMD="PANDAS_DATA_MANAGER=array pytest -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE pandas"

if [[ "$PATTERN" ]]; then
PYTEST_AM_CMD="$PYTEST_AM_CMD -m \"$PATTERN and arraymanager\""
else
PYTEST_AM_CMD="$PYTEST_AM_CMD -m \"arraymanager\""
fi

echo $PYTEST_AM_CMD
sh -c "$PYTEST_AM_CMD"
Expand Down
23 changes: 10 additions & 13 deletions pandas/tests/io/test_clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,13 @@ def test_invalid_encoding(self, df):
def test_round_trip_valid_encodings(self, enc, df):
self.check_round_trip_frame(df, encoding=enc)


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