We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f86c7e1 commit d923ae4Copy full SHA for d923ae4
tests/unit/utils/test_zip_files.py
@@ -63,6 +63,16 @@ def test_extract__invalid_file_extension():
63
extract(src_file_path=Path("/tmp/dir/tempfile.download"))
64
65
66
+def test_extract__invalid_dst_dir(temp_dir: Path):
67
+ # Arrange
68
+ with open(temp_dir / "notadir.txt", "wb"):
69
+ pass
70
+
71
+ # Act / Assert
72
+ with pytest.raises(NotADirectoryError, match=r"Destination dir .*notadir\.txt exists and is not a directory"):
73
+ extract(src_file_path=Path("file.zip"), dst_dir_path=temp_dir / "notadir.txt")
74
75
76
@patch("power_grid_model_io.utils.download.tqdm")
77
def test_extract__file_exists(mock_tqdm: MagicMock, temp_dir: Path):
78
# Arrange
0 commit comments