def test_temp_dir_cleaning(test_file): mis = Miz(test_file) mis.unzip() assert mis.temp_dir.exists() assert mis.temp_dir.glob('*') mis._remove_temp_dir() assert not mis.temp_dir.exists()
def test_bad_zip_file(bad_zip_file): from zipfile import BadZipFile mis = Miz(bad_zip_file) with pytest.raises(BadZipFile): mis.unzip()
def test_missing_file_in_miz(missing_file): missing = Miz(missing_file) with pytest.raises(FileNotFoundError): missing.unzip()
def test_is_unzipped(test_file): mis = Miz(test_file) assert not mis.zip_content mis.unzip() assert mis.zip_content
def test_decode(test_file): miz = Miz(test_file) miz.unzip() miz.decode()
def test_unzip(test_file): miz = Miz(test_file) miz.unzip()
def test_large_decode(large_file): miz = Miz(large_file) miz.unzip() miz.decode()