Fix rar tests again

This commit is contained in:
Timmy Welch 2022-10-02 21:47:07 -07:00
parent 5587bfac31
commit 4034123e6d
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

@ -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)