From 4034123e6d1aae44f3530be78fd791ed8e3b4fa2 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sun, 2 Oct 2022 21:47:07 -0700 Subject: [PATCH] Fix rar tests again --- comicapi/comicarchive.py | 2 +- tests/comicarchive_test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/comicapi/comicarchive.py b/comicapi/comicarchive.py index a5dfc49..34034bb 100644 --- a/comicapi/comicarchive.py +++ b/comicapi/comicarchive.py @@ -385,7 +385,7 @@ class RarArchiver(UnknownArchiver): if rar_support and self.rar_exe_path: try: # write comment to temp file - with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir: + with tempfile.TemporaryDirectory() as tmp_dir: tmp_file = pathlib.Path(tmp_dir) / "rar_comment.txt" tmp_file.write_text(comment, encoding="utf-8") diff --git a/tests/comicarchive_test.py b/tests/comicarchive_test.py index d1d08b9..9da035f 100644 --- a/tests/comicarchive_test.py +++ b/tests/comicarchive_test.py @@ -56,7 +56,7 @@ def test_save_cbi(tmp_comic): md = tmp_comic.read_cbi() -@pytest.mark.xfail(not (comicapi.comicarchive.rar_support and shutil.which("rar"))) +@pytest.mark.xfail(not (comicapi.comicarchive.rar_support and shutil.which("rar")), reason="rar support") def test_save_cix_rar(tmp_path): cbr_path = datadir / "fake_cbr.cbr" shutil.copy(cbr_path, tmp_path) @@ -68,7 +68,7 @@ def test_save_cix_rar(tmp_path): assert md.replace(pages=[]) == comicapi.genericmetadata.md_test.replace(pages=[]) -@pytest.mark.xfail(not (comicapi.comicarchive.rar_support and shutil.which("rar"))) +@pytest.mark.xfail(not (comicapi.comicarchive.rar_support and shutil.which("rar")), reason="rar support") def test_save_cbi_rar(tmp_path): cbr_path = datadir / "fake_cbr.cbr" shutil.copy(cbr_path, tmp_path)