Skip to content

Commit

Permalink
Merge a46ef9e into fd08a22
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoneback committed Feb 4, 2021
2 parents fd08a22 + a46ef9e commit 37e041f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysatMissions/tests/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pysat.tests.instrument_test_class import InstTestClass


saved_path = pysat.data_dir
saved_path = pysat.params['data_dirs']

# Developers for instrument libraries should update the following line to
# point to their own subpackage location
Expand Down Expand Up @@ -54,15 +54,15 @@ def setup_class(self):
# Make sure to use a temporary directory so that the user's setup is not
# altered
self.tempdir = tempfile.TemporaryDirectory()
self.saved_path = pysat.data_dir
pysat.utils.set_data_dir(self.tempdir.name, store=False)
self.saved_path = pysat.params['data_dirs']
pysat.params.data['data_dirs'] = [self.tempdir.name]
# Developers for instrument libraries should update the following line
# to point to their own subpackage location, e.g.,
# self.inst_loc = mypackage.instruments
self.inst_loc = pysatMissions.instruments

def teardown_class(self):
"""Runs once to clean up testing from this class."""
pysat.utils.set_data_dir(self.saved_path, store=False)
pysat.params.data['data_dirs'] = self.saved_path
self.tempdir.cleanup()
del self.inst_loc, self.saved_path, self.tempdir

0 comments on commit 37e041f

Please sign in to comment.