Skip to content

Commit 51d99bd

Browse files
adrienpacificonoatamir
authored andcommitted
change test such that it passes in headless mode (instead of xpass) (pandas-dev#48520)
* change test such that it passes in headless mode (instead of xpass), and xpass in non-headless mode (instead of error) * linting * add single_cpu mark * correct the odorerr of pytest.mark
1 parent d09891c commit 51d99bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/test_clipboard.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from textwrap import dedent
23

34
import numpy as np
@@ -389,11 +390,12 @@ def test_invalid_encoding(self, df):
389390
def test_round_trip_valid_encodings(self, enc, df):
390391
self.check_round_trip_frame(df, encoding=enc)
391392

393+
@pytest.mark.single_cpu
392394
@pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."])
393395
@pytest.mark.xfail(
394-
reason="Flaky test in multi-process CI environment: GH 44584",
395-
raises=AssertionError,
396-
strict=False,
396+
os.environ.get("DISPLAY") is None,
397+
reason="Cannot be runed if a headless system is not put in place with Xvfb",
398+
strict=True,
397399
)
398400
def test_raw_roundtrip(self, data):
399401
# PR #25040 wide unicode wasn't copied correctly on PY3 on windows

0 commit comments

Comments
 (0)