Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
85f65d49
Commit
85f65d49
authored
Sep 29, 2022
by
BO ZHANG
🏀
Browse files
added unit test for CsstMbiDataManager
parent
5e2fd0cc
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/test_data_manager.py
View file @
85f65d49
...
...
@@ -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)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment