Skip to content

Commit

Permalink
added download test, added travis tests for different python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaussin committed Mar 4, 2019
1 parent a03f744 commit 7ba6431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -4,7 +4,9 @@ notifications:
email: false
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "3.6"
- "2.7"
- "3.4"
- "3.7"
install:
# You may want to periodically update this, although the conda update
# conda line below will keep everything up-to-date. We do this
Expand Down
6 changes: 5 additions & 1 deletion tests/test_download.py
Expand Up @@ -7,6 +7,7 @@
from merra.download import get_last_folder
from merra.download import get_first_folder
from merra.download import folder_get_version_first_last
from merra.download import get_start_date


class Test(unittest.TestCase):
Expand Down Expand Up @@ -76,7 +77,10 @@ def test_get_start_end(self):
assert version == version_should
assert end == end_should
assert start == start_should


def test_get_start_date(self):
product = 'M2T1NXLND.5.12.4'
assert get_start_date(product) == datetime(1980, 1, 1)

if __name__ == "__main__":
unittest.main()

0 comments on commit 7ba6431

Please sign in to comment.