Skip to content

Commit

Permalink
TST: expand mock download tests
Browse files Browse the repository at this point in the history
Ensure all instruments are covered in the mock download tests.
  • Loading branch information
aburrell committed Nov 1, 2023
1 parent 97d4c2e commit 99aeb50
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pysatSpaceWeather/tests/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ def teardown_method(self):
del self.dkwargs, self.tempdir, self.saved_path
return

@pytest.mark.parametrize("inst_dict", instruments['download'])
@pytest.mark.parametrize("inst_dict", instruments['download']
+ instruments['no_download'])
def test_error_bad_dir(self, inst_dict):
"""Test IOError is raised for a bad mock-download directory.
Expand All @@ -369,7 +370,8 @@ def test_error_bad_dir(self, inst_dict):
input_args=[date], input_kwargs=self.dkwargs)
return

@pytest.mark.parametrize("inst_dict", instruments['download'])
@pytest.mark.parametrize("inst_dict", instruments['download']
+ instruments['no_download'])
def test_loginfo_missing_file(self, inst_dict, caplog):
"""Test log for info about a missing file when using mock downloads.
Expand All @@ -395,7 +397,8 @@ def test_loginfo_missing_file(self, inst_dict, caplog):
captured)
return

@pytest.mark.parametrize("inst_dict", instruments['download'])
@pytest.mark.parametrize("inst_dict", instruments['download']
+ instruments['no_download'])
def test_mock_download(self, inst_dict):
"""Test pysat's ability to process files downloaded by a user.
Expand Down

0 comments on commit 99aeb50

Please sign in to comment.