Commit 85f65d49 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added unit test for CsstMbiDataManager

parent 5e2fd0cc
......@@ -11,6 +11,7 @@ Modified-History:
import os
import unittest
from csst_common.data_manager import CsstMbiDataManager
from csst_common.params import CSST_PARAMS as CP
class TestDataManager(unittest.TestCase):
......@@ -18,7 +19,7 @@ class TestDataManager(unittest.TestCase):
self.dm = CsstMbiDataManager.quickstart(ver_sim="C5.2", dir_l1=".", exposure_id=100)
def test_l0data_existence(self):
self.assertTrue(self.dm.available_detectors == 18)
self.assertTrue(len(self.dm.available_detectors) == len(CP["mbi"]["detectors"]))
self.assertTrue(os.path.exists(self.dm.l0_detector(6)))
self.assertTrue(os.path.exists(self.dm.l0_log(6)))
self.assertTrue(os.path.exists(self.dm.l0_cat(6)))
......@@ -27,6 +28,6 @@ class TestDataManager(unittest.TestCase):
self.assertTrue(isinstance(self.dm.l1_file(name="some_file.ext", comment="a demo file"), str))
class TestParams(unittest.TestCase):
def test_params(self):
self.assertTrue(True)
# class TestParams(unittest.TestCase):
# def test_params(self):
# self.assertTrue(True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment