|
18 | 18 | make_zim_file, |
19 | 19 | validate_file_creatable, |
20 | 20 | validate_folder_writable, |
21 | | - validate_zimfile_creatable, |
22 | 21 | ) |
23 | 22 |
|
24 | 23 |
|
@@ -173,37 +172,6 @@ def valid_zim_filename(): |
173 | 172 | return "myfile.zim" |
174 | 173 |
|
175 | 174 |
|
176 | | -def test_validate_zimfile_creatable_ok(tmp_path, valid_zim_filename): |
177 | | - |
178 | | - validate_zimfile_creatable(tmp_path, valid_zim_filename) |
179 | | - |
180 | | - |
181 | | -def test_validate_zimfile_creatable_folder_not_exists(tmp_path, valid_zim_filename): |
182 | | - |
183 | | - with pytest.raises(MissingFolderError): |
184 | | - validate_zimfile_creatable(tmp_path / "foo", valid_zim_filename) |
185 | | - |
186 | | - |
187 | | -def test_validate_zimfile_creatable_bad_folder(tmp_path, valid_zim_filename): |
188 | | - |
189 | | - with pytest.raises(NotADirectoryFolderError): |
190 | | - (tmp_path / "foo.txt").touch() |
191 | | - validate_zimfile_creatable(tmp_path / "foo.txt", valid_zim_filename) |
192 | | - |
193 | | - |
194 | | -def test_validate_zimfile_creatable_folder_not_writable(tmp_path, valid_zim_filename): |
195 | | - |
196 | | - with pytest.raises(NotWritableFolderError): |
197 | | - (tmp_path / "foo").mkdir(mode=111) |
198 | | - validate_zimfile_creatable(tmp_path / "foo", valid_zim_filename) |
199 | | - |
200 | | - |
201 | | -def test_validate_zimfile_creatable_bad_name(tmp_path): |
202 | | - |
203 | | - with pytest.raises(IncorrectFilenameError): |
204 | | - validate_zimfile_creatable(tmp_path, "t\0t\0.zim") |
205 | | - |
206 | | - |
207 | 175 | def test_validate_folder_writable_not_exists(tmp_path): |
208 | 176 |
|
209 | 177 | with pytest.raises(MissingFolderError): |
|
0 commit comments