|
1 | 1 | import os
|
2 |
| -import subprocess |
3 | 2 | from textwrap import dedent
|
4 | 3 |
|
5 | 4 | import numpy as np
|
6 | 5 | import pytest
|
7 | 6 |
|
8 |
| -from pandas.compat import ( |
9 |
| - is_ci_environment, |
10 |
| - is_platform_linux, |
11 |
| - is_platform_mac, |
12 |
| -) |
| 7 | +from pandas.compat import is_ci_environment |
13 | 8 | from pandas.errors import (
|
14 | 9 | PyperclipException,
|
15 | 10 | PyperclipWindowsException,
|
@@ -406,17 +401,14 @@ def test_round_trip_valid_encodings(self, enc, df):
|
406 | 401 | @pytest.mark.single_cpu
|
407 | 402 | @pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."])
|
408 | 403 | @pytest.mark.xfail(
|
409 |
| - os.environ.get("DISPLAY") is None and not is_platform_mac(), |
410 |
| - reason="Cannot be runed if a headless system is not put in place with Xvfb", |
411 |
| - strict=True, |
| 404 | + os.environ.get("DISPLAY") is None or is_ci_environment(), |
| 405 | + reason="Cannot pass if a headless system is not put in place with Xvfb", |
| 406 | + strict=not is_ci_environment(), # Flaky failures in the CI |
412 | 407 | )
|
413 | 408 | def test_raw_roundtrip(self, data):
|
414 | 409 | # PR #25040 wide unicode wasn't copied correctly on PY3 on windows
|
415 | 410 | clipboard_set(data)
|
416 | 411 | assert data == clipboard_get()
|
417 |
| - if is_ci_environment() and is_platform_linux(): |
418 |
| - # Clipboard can sometimes keep previous param causing flaky CI failures |
419 |
| - subprocess.run(["xsel", "--delete", "--clipboard"], check=True) |
420 | 412 |
|
421 | 413 | @pytest.mark.parametrize("engine", ["c", "python"])
|
422 | 414 | def test_read_clipboard_dtype_backend(
|
|
0 commit comments