Fix rar tests again
This commit is contained in:
parent
5587bfac31
commit
4034123e6d
@ -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")
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user