Skip to content

Commit cf3b28d

Browse files
committed
start n=1
1 parent 82ea9f5 commit cf3b28d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pandas/tests/io/test_clipboard.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ def test_round_trip_frame_string(self, df):
258258
# Two character separator is not supported in to_clipboard
259259
# Test that multi-character separators are not silently passed
260260
def test_excel_sep_warning(self, df):
261-
with tm.assert_produces_warning():
261+
with tm.assert_produces_warning(
262+
UserWarning,
263+
match="to_clipboard in excel mode requires a single character separator.",
264+
check_stacklevel=False,
265+
):
262266
df.to_clipboard(excel=True, sep=r"\t")
263267

264268
# Separator is ignored when excel=False and should produce a warning

pandas/util/_exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def find_stack_level(frame) -> int:
4141
test_dir = os.path.join(pkg_dir, "tests")
4242

4343
# https://stackoverflow.com/questions/17407119/python-inspect-stack-is-slow
44-
n = 0
44+
n = 1
4545
while frame:
4646
fname = inspect.getfile(frame)
4747
if fname.startswith(pkg_dir) and not fname.startswith(test_dir):

0 commit comments

Comments
 (0)