-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from pysat/develop
Develop update
- Loading branch information
Showing
8 changed files
with
161 additions
and
101 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
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
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,33 @@ | ||
import pytest | ||
from pysatMadrigal.instruments.methods import madrigal as pm_meth | ||
|
||
|
||
class TestBasic(): | ||
|
||
def setup(self): | ||
"""Runs before every method to create a clean testing setup.""" | ||
self.kwargs = {'inst_code': 'inst_code', | ||
'user': 'username', | ||
'password': 'password'} | ||
|
||
def cleanup(self): | ||
"""Runs after every method to clean up previous testing.""" | ||
del self.kwargs | ||
|
||
@pytest.mark.parametrize("del_val", | ||
['inst_code', 'user', 'password']) | ||
def test_check_madrigal_params_no_input(self, del_val): | ||
"""Test that an error is thrown if None is passed through""" | ||
self.kwargs[del_val] = None | ||
|
||
with pytest.raises(ValueError): | ||
pm_meth._check_madrigal_params(**self.kwargs) | ||
|
||
@pytest.mark.parametrize("del_val", | ||
['user', 'password']) | ||
def test_check_madrigal_params_bad_input(self, del_val): | ||
"""Test that an error is thrown if non-string is passed through""" | ||
self.kwargs[del_val] = 17 | ||
|
||
with pytest.raises(ValueError): | ||
pm_meth._check_madrigal_params(**self.kwargs) |
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
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,6 @@ | ||
h5py | ||
madrigalWeb | ||
numpy | ||
pandas | ||
pysat>=3.0 | ||
xarray |
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
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
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,8 @@ | ||
coveralls | ||
m2r2 | ||
numpydoc | ||
pytest-cov | ||
pytest-ordering | ||
pytest-flake8 | ||
sphinx | ||
sphinx_rtd_theme |