diff --git a/tests/test_FullChain.py b/tests/test_FullChain.py index 794451c3..bbf100aa 100644 --- a/tests/test_FullChain.py +++ b/tests/test_FullChain.py @@ -17,6 +17,8 @@ def setUpClass(cls): downloader = straxen.MongoDownloader(store_files_at=(cls.temp_dir.name,)) downloader.download_single(test_root_file_name, human_readable_file_name=True) + assert os.path.exists(os.path.join(cls.temp_dir.name, test_root_file_name)) + cls.test_context = fuse.context.full_chain_context(output_folder = cls.temp_dir.name) cls.test_context.set_config({"path": cls.temp_dir.name, diff --git a/tests/test_MicroPhysics.py b/tests/test_MicroPhysics.py index a40853b8..22fa1d58 100644 --- a/tests/test_MicroPhysics.py +++ b/tests/test_MicroPhysics.py @@ -17,6 +17,8 @@ def setUpClass(cls): downloader = straxen.MongoDownloader(store_files_at=(cls.temp_dir.name,)) downloader.download_single(test_root_file_name, human_readable_file_name=True) + assert os.path.exists(os.path.join(cls.temp_dir.name, test_root_file_name)) + cls.test_context = fuse.context.microphysics_context(cls.temp_dir.name) cls.test_context.set_config({"path": cls.temp_dir.name, diff --git a/tests/test_deterministic_seed.py b/tests/test_deterministic_seed.py index e7dbde3d..6b9a1777 100644 --- a/tests/test_deterministic_seed.py +++ b/tests/test_deterministic_seed.py @@ -1,6 +1,6 @@ +import os import unittest import tempfile -import numpy as np import fuse import straxen from numpy.testing import assert_array_equal, assert_raises @@ -14,8 +14,10 @@ def setUp(self): self.temp_dir_0 = tempfile.TemporaryDirectory() self.temp_dir_1 = tempfile.TemporaryDirectory() - downloader = straxen.MongoDownloader(store_files_at=(self.temp_dir_0.name,)) - downloader.download_single(test_root_file_name, human_readable_file_name=True) + for temp_dir in [self.temp_dir_0, self.temp_dir_1]: + downloader = straxen.MongoDownloader(store_files_at=(temp_dir.name,)) + downloader.download_single(test_root_file_name, human_readable_file_name=True) + assert os.path.exists(os.path.join(temp_dir.name, test_root_file_name)) self.test_context_0 = fuse.context.full_chain_context(output_folder = self.temp_dir_0.name)