Skip to content

Commit

Permalink
add unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
levineds committed Jul 22, 2024
1 parent 04d669b commit 9bd6c74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/core/test_download_large_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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')

0 comments on commit 9bd6c74

Please sign in to comment.