Skip to content

Commit 2ec0949

Browse files
gfyoungjreback
authored andcommitted
TST: Remove clipboard-excel test warnings (#19052)
Closes gh-19010.
1 parent e459133 commit 2ec0949

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/test_clipboard.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,16 @@ def test_round_trip_frame(self):
9191
self.check_round_trip_frame(dt)
9292

9393
def test_read_clipboard_infer_excel(self):
94+
# gh-19010: avoid warnings
95+
clip_kwargs = dict(engine="python")
9496

9597
text = dedent("""
9698
John James Charlie Mingus
9799
1 2
98100
4 Harry Carney
99101
""".strip())
100102
clipboard_set(text)
101-
df = pd.read_clipboard()
103+
df = pd.read_clipboard(**clip_kwargs)
102104

103105
# excel data is parsed correctly
104106
assert df.iloc[1][1] == 'Harry Carney'
@@ -110,15 +112,15 @@ def test_read_clipboard_infer_excel(self):
110112
3 4
111113
""".strip())
112114
clipboard_set(text)
113-
res = pd.read_clipboard()
115+
res = pd.read_clipboard(**clip_kwargs)
114116

115117
text = dedent("""
116118
a b
117119
1 2
118120
3 4
119121
""".strip())
120122
clipboard_set(text)
121-
exp = pd.read_clipboard()
123+
exp = pd.read_clipboard(**clip_kwargs)
122124

123125
tm.assert_frame_equal(res, exp)
124126

0 commit comments

Comments
 (0)