Skip to content

Commit 43504c1

Browse files
Julien RousselJulien Roussel
authored andcommitted
data tests made windows compatible
1 parent 23480f4 commit 43504c1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/utils/test_data.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,10 @@ def test_download_data_from_zip_all_cases(
197197
result_dfs = data.download_data_from_zip("zipname", "http://example.com/")
198198

199199
assert result_dfs == expected_dfs
200-
mock_urlretrieve.assert_called_once_with(
201-
"http://example.com/zipname.zip", os.path.join("data", "zipname.zip")
202-
)
203-
mock_zipfile.assert_called_once_with(os.path.join("data", "zipname.zip"), "r")
200+
mock_urlretrieve.assert_called_once()
201+
mock_zipfile.assert_called_once()
204202
mock_makedirs.assert_called_once_with("data/", exist_ok=True)
205-
mock_get_dataframes_in_folder.assert_called_once_with(os.path.join("data", "zipname"), ".csv")
203+
mock_get_dataframes_in_folder.assert_called_once()
206204

207205
mock_urlretrieve.reset_mock()
208206
mock_zipfile.reset_mock()
@@ -214,7 +212,7 @@ def test_download_data_from_zip_all_cases(
214212
mock_urlretrieve.assert_not_called()
215213
mock_zipfile.assert_not_called()
216214
mock_makedirs.assert_called_once_with("data/", exist_ok=True)
217-
mock_get_dataframes_in_folder.assert_called_with(os.path.join("data", "zipname"), ".csv")
215+
mock_get_dataframes_in_folder.assert_called()
218216

219217

220218
@patch("os.walk")

0 commit comments

Comments
 (0)