diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index 18559b9b4f899..86be104b16367 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -860,6 +860,19 @@ def test_basic_frame_series_alignment( def test_basic_series_frame_alignment( self, request, engine, parser, index_name, r_idx_type, c_idx_type ): + if ( + engine == "numexpr" + and parser == "pandas" + and index_name == "index" + and r_idx_type == "i" + and c_idx_type == "s" + ): + reason = ( + f"Flaky column ordering when engine={engine}, " + f"parser={parser}, index_name={index_name}, " + f"r_idx_type={r_idx_type}, c_idx_type={c_idx_type}" + ) + request.node.add_marker(pytest.mark.xfail(reason=reason, strict=False)) df = tm.makeCustomDataframe( 10, 7, data_gen_f=f, r_idx_type=r_idx_type, c_idx_type=c_idx_type ) diff --git a/pandas/tests/io/test_clipboard.py b/pandas/tests/io/test_clipboard.py index 5e4b2c1ebad9d..d018affdecfca 100644 --- a/pandas/tests/io/test_clipboard.py +++ b/pandas/tests/io/test_clipboard.py @@ -1,10 +1,15 @@ import os +import subprocess from textwrap import dedent import numpy as np import pytest -from pandas.compat import is_platform_mac +from pandas.compat import ( + is_ci_environment, + is_platform_linux, + is_platform_mac, +) from pandas.errors import ( PyperclipException, PyperclipWindowsException, @@ -409,6 +414,9 @@ 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() + if is_ci_environment() and is_platform_linux(): + # Clipboard can sometimes keep previous param causing flaky CI failures + subprocess.run(["xsel", "--delete", "--clipboard"], check=True) @pytest.mark.parametrize("dtype_backend", ["pandas", "pyarrow"]) @pytest.mark.parametrize("engine", ["c", "python"])