diff --git a/pandas/tests/io/test_clipboard.py b/pandas/tests/io/test_clipboard.py index db85cb416145f..d76b731ba43f9 100644 --- a/pandas/tests/io/test_clipboard.py +++ b/pandas/tests/io/test_clipboard.py @@ -1,3 +1,4 @@ +import os from textwrap import dedent import numpy as np @@ -389,11 +390,12 @@ 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_cpu @pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."]) @pytest.mark.xfail( - reason="Flaky test in multi-process CI environment: GH 44584", - raises=AssertionError, - strict=False, + os.environ.get("DISPLAY") is None, + reason="Cannot be runed if a headless system is not put in place with Xvfb", + strict=True, ) def test_raw_roundtrip(self, data): # PR #25040 wide unicode wasn't copied correctly on PY3 on windows