Skip to content

CI: Fix clipboard problems #29712

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
merged 27 commits into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ca3898a
CI: Fix inconsistent clipboard test
datapythonista Nov 19, 2019
2c68362
Merge remote-tracking branch 'upstream/master' into clipboard_error
TomAugspurger Nov 19, 2019
d72987f
lazy check
TomAugspurger Nov 19, 2019
5e0e32c
Running clipboard tests in all builds (I think we already do in pract…
datapythonista Nov 20, 2019
5fe9209
Adding missing self
datapythonista Nov 20, 2019
99315bf
Restoring test outside class
datapythonista Nov 20, 2019
1e53de6
Explicitly skipping clipboard tests in the travis config (azure is do…
datapythonista Nov 20, 2019
7c527c8
Disabling clipboard where it should not be tested, installing xsel wh…
datapythonista Nov 20, 2019
36ff3ce
Removing qt from conda
datapythonista Nov 20, 2019
63c7364
Setting DISPLAY env var
datapythonista Nov 20, 2019
ebfc48b
Trying to understand if xsel is found or not
datapythonista Nov 20, 2019
f84ac34
Better checking to see if xsel is installed
datapythonista Nov 20, 2019
c15f5a7
More xsel info
datapythonista Nov 20, 2019
fea7bae
Merging from master
datapythonista Dec 30, 2019
8532555
Removing xfail
datapythonista Dec 30, 2019
ed429ed
Fixing debug info
datapythonista Dec 31, 2019
cb950f8
Merging from master
datapythonista Jan 8, 2020
fec1363
Black
datapythonista Jan 8, 2020
7cff22d
Fixed typo in a comment
datapythonista Jan 10, 2020
69ea764
Merge remote-tracking branch 'upstream/master' into clipboard_error
datapythonista Jan 14, 2020
49181e3
Checking xsel
datapythonista Jan 14, 2020
8a8244d
Adding more checks for xsel
datapythonista Jan 14, 2020
3384d1e
Using xvfb
datapythonista Jan 15, 2020
670409e
Not logging xvfb output
datapythonista Jan 15, 2020
4a4e116
Removing checks
datapythonista Jan 15, 2020
2ec47e5
Fixing patterns, calling all tests (just debug raises left to be merged)
datapythonista Jan 15, 2020
4a9ed03
Final clean up, this should be ready
datapythonista Jan 15, 2020
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
3 changes: 1 addition & 2 deletions ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ PYTEST_CMD="pytest -m \"$PATTERN\" -n auto --dist=loadfile -s --strict --duratio

# Travis does not have have an X server
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
DISPLAY=DISPLAY=:99.0
PYTEST_CMD="xvfb-run -e /dev/stdout $PYTEST_CMD"
PYTEST_CMD="xvfb-run -a -e /dev/stdout $PYTEST_CMD"
fi

echo $PYTEST_CMD
Expand Down
21 changes: 5 additions & 16 deletions pandas/tests/io/test_clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@

from pandas.io.clipboard import PyperclipException, clipboard_get, clipboard_set

try:
DataFrame({"A": [1, 2]}).to_clipboard()
_DEPS_INSTALLED = 1
except (PyperclipException, RuntimeError):
_DEPS_INSTALLED = 0


def build_kwargs(sep, excel):
kwargs = {}
Expand Down Expand Up @@ -148,7 +142,6 @@ def test_mock_clipboard(mock_clipboard):

@pytest.mark.single
@pytest.mark.clipboard
@pytest.mark.skipif(not _DEPS_INSTALLED, reason="clipboard primitives not installed")
@pytest.mark.usefixtures("mock_clipboard")
class TestClipboard:
def check_round_trip_frame(self, data, excel=None, sep=None, encoding=None):
Expand Down Expand Up @@ -253,12 +246,8 @@ 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.skipif(not _DEPS_INSTALLED, reason="clipboard primitives not installed")
@pytest.mark.parametrize("data", ["\U0001f44d...", "Ωœ∑´...", "abcd..."])
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..."])
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()