-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- not working - need to fix download.py first
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |