Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #721 from dstansby/v0.7.x
Browse files Browse the repository at this point in the history
Backport #719 to 0.7.x
  • Loading branch information
dstansby authored Jun 6, 2019
2 parents f37d6ef + cfd2b5b commit cf2ee30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion heliopy/data/mms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _validate_instrument(instrument):


def _validate_probe(probe):
allowed_probes = [str(i) for i in range(4)]
allowed_probes = [str(i+1) for i in range(4)]
probe = str(probe)
if probe not in allowed_probes:
raise ValueError(
Expand Down
18 changes: 12 additions & 6 deletions heliopy/data/test/test_mms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,41 @@

from .util import check_data_output


mms = pytest.importorskip('heliopy.data.mms')
pytest.mark.data()


starttime = datetime(2016, 1, 2, 0, 0, 0)
endtime = datetime(2016, 1, 2, 1, 0, 0)
probe = '1'
probes = ['1', '4']


def test_fgm():
@pytest.mark.parametrize("probe", probes)
def test_fgm(probe):
df = mms.fgm(probe, 'srvy', starttime, endtime)
check_data_output(df)


def test_fpi_dis_moms():
@pytest.mark.parametrize("probe", probes)
def test_fpi_dis_moms(probe):
df = mms.fpi_dis_moms(probe, 'fast', starttime, endtime)
check_data_output(df)


def test_fpi_des_moms():
@pytest.mark.parametrize("probe", probes)
def test_fpi_des_moms(probe):
df = mms.fpi_des_moms(probe, 'fast', starttime, endtime)
check_data_output(df)


def test_fpi_dis_dist():
@pytest.mark.parametrize("probe", probes)
def test_fpi_dis_dist(probe):
df = mms.fpi_dis_dist(probe, 'fast', starttime, endtime)
check_data_output(df)


def test_fpi_des_dist():
@pytest.mark.parametrize("probe", probes)
def test_fpi_des_dist(probe):
df = mms.fpi_des_dist(probe, 'fast', starttime, endtime)
check_data_output(df)

0 comments on commit cf2ee30

Please sign in to comment.