Skip to content

Commit

Permalink
- added download test file
Browse files Browse the repository at this point in the history
- not working
- need to fix download.py first
  • Loading branch information
fzaussin committed Jan 28, 2019
1 parent d1a541b commit 6e56e7d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_download.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Tests for the download module of GLDAS.
"""
import os
from datetime import datetime
from merra.download import get_last_formatted_dir_in_dir
from merra.download import get_first_formatted_dir_in_dir
from merra.download import get_last_folder
from merra.download import get_first_folder
from merra.download import folder_get_version_first_last

def test_get_last_dir_in_dir():
path = os.path.join(os.path.dirname(__file__),
'folder_test', 'success')
last_dir = get_last_formatted_dir_in_dir(path, "{time:%Y}")
assert last_dir == '2018'


if __name__ == '__main__':
test_get_last_dir_in_dir()

0 comments on commit 6e56e7d

Please sign in to comment.