From 80956e1a5532e769523c34393461524ec6c13a92 Mon Sep 17 00:00:00 2001 From: JHM Darbyshire <24256554+attack68@users.noreply.github.com> Date: Fri, 27 May 2022 12:26:55 +0100 Subject: [PATCH] Backport PR #47135: CLN: ensure clean up styler tests --- pandas/tests/io/formats/style/test_style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/formats/style/test_style.py b/pandas/tests/io/formats/style/test_style.py index 1a056f8cb3363..ab0fa8349b9c7 100644 --- a/pandas/tests/io/formats/style/test_style.py +++ b/pandas/tests/io/formats/style/test_style.py @@ -1552,5 +1552,5 @@ def test_col_trimming_hide_columns(): @pytest.mark.parametrize("format", ["html", "latex"]) def test_output_buffer(mi_styler, format): # gh 47053 - with open(f"delete_me.{format}", "w") as f: + with tm.ensure_clean(f"delete_me.{format}") as f: getattr(mi_styler, f"to_{format}")(f)