Skip to content

Commit

Permalink
BUG: test data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Mar 5, 2021
1 parent 6f5859c commit 2d151db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pysatIncubator/tests/test_instruments.py
Expand Up @@ -46,16 +46,16 @@ 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 = pysatIncubator.instruments

def teardown_class(self):
"""Runs after every method to clean up previous testing."""
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

Expand Down

0 comments on commit 2d151db

Please sign in to comment.