Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
levineds committed Jul 22, 2024
1 parent 9bd6c74 commit 99887f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/core/test_download_large_files.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
from unittest.mock import patch

from fairchem.core.scripts import download_large_files as dl_large


@patch.object(dl_large, "urlretreive")
def test_download_large_files(url_mock):
def urlretrieve_mock(x, y):
if not os.path.exists(os.path.dirname(y)):
raise ValueError(f'The path to {y} does not exist. fairchem directory structure has changed,')
url_mock.side_effect = urlretrieve_mock
dl_large.main('ALL')
raise ValueError(
f"The path to {y} does not exist. fairchem directory structure has changed,"
)

url_mock.side_effect = urlretrieve_mock
dl_large.main("ALL")

0 comments on commit 99887f5

Please sign in to comment.