def test_get_archive_tmp_dir() -> None: path = Path("foo") res = Comic._get_archive_tmp_dir(path) assert res == Path("picopt_tmp_" + str(path))
def _setup_write_zipfile(old_path: Path) -> Tuple[Path, Settings]: tmp_dir = Comic._get_archive_tmp_dir(old_path) tmp_dir.mkdir(exist_ok=True, parents=True) test_file = tmp_dir / "test.txt" test_file.write_text("x") return tmp_dir, Settings()