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-dfs
csst-dfs-client
Commits
72ca8f42
Commit
72ca8f42
authored
Feb 20, 2025
by
Wei Shoulin
Browse files
更新测试文件文件路径
parent
38d23cc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_common.py
View file @
72ca8f42
...
@@ -7,7 +7,7 @@ class CommonTestCase(unittest.TestCase):
...
@@ -7,7 +7,7 @@ class CommonTestCase(unittest.TestCase):
pass
pass
def
test_download_level0_file
(
self
):
def
test_download_level0_file
(
self
):
bytes_data
=
download_file
(
file_path
=
"L2/MSC/CSST-MSC-L2-MBI-CAT/254/CSST_MSC_MS_SCI_20310423084104_20310423084334_10109400638867_12_L2_V01_CATMIX.fits"
)
bytes_data
=
download_file
(
file_path
=
"L2/MSC/
094/auto/
CSST-MSC-L2-MBI-CAT/254/CSST_MSC_MS_SCI_20310423084104_20310423084334_10109400638867_12_L2_V01_CATMIX.fits"
)
# save the downloaded file to a local directory
# save the downloaded file to a local directory
tmp_file_dir
=
os
.
environ
.
get
(
"UNIT_TEST_DATA_ROOT"
,
"/tmp"
)
tmp_file_dir
=
os
.
environ
.
get
(
"UNIT_TEST_DATA_ROOT"
,
"/tmp"
)
tmp_file_path
=
os
.
path
.
join
(
tmp_file_dir
,
"test_downloaded_file.fits"
)
tmp_file_path
=
os
.
path
.
join
(
tmp_file_dir
,
"test_downloaded_file.fits"
)
...
@@ -21,7 +21,7 @@ class CommonTestCase(unittest.TestCase):
...
@@ -21,7 +21,7 @@ class CommonTestCase(unittest.TestCase):
os
.
remove
(
tmp_file_path
)
os
.
remove
(
tmp_file_path
)
def
test_read_file
(
self
):
def
test_read_file
(
self
):
bytes_io
=
read_file
(
file_path
=
"L2/MSC/CSST-MSC-L2-MBI-CAT/254/CSST_MSC_MS_SCI_20310423084104_20310423084334_10109400638867_12_L2_V01_CATMIX.fits"
)
bytes_io
=
read_file
(
file_path
=
"L2/MSC/
094/auto/
CSST-MSC-L2-MBI-CAT/254/CSST_MSC_MS_SCI_20310423084104_20310423084334_10109400638867_12_L2_V01_CATMIX.fits"
)
# save the downloaded file to a local directory
# save the downloaded file to a local directory
tmp_file_dir
=
os
.
environ
.
get
(
"UNIT_TEST_DATA_ROOT"
,
"/tmp"
)
tmp_file_dir
=
os
.
environ
.
get
(
"UNIT_TEST_DATA_ROOT"
,
"/tmp"
)
tmp_file_path
=
os
.
path
.
join
(
tmp_file_dir
,
"test_downloaded_file.fits"
)
tmp_file_path
=
os
.
path
.
join
(
tmp_file_dir
,
"test_downloaded_file.fits"
)
...
@@ -35,6 +35,6 @@ class CommonTestCase(unittest.TestCase):
...
@@ -35,6 +35,6 @@ class CommonTestCase(unittest.TestCase):
os
.
remove
(
tmp_file_path
)
os
.
remove
(
tmp_file_path
)
def
test_get_free_header
(
self
):
def
test_get_free_header
(
self
):
header_items
=
get_free_header
(
file_path
=
"L
0
/MSC/
routine/SCI/10109100157991/CSST_MSC_MS_SCI_20240609181116_20240609181
34
7
_10109
1
00
157991_27
_L
0
_V01.fits"
)
header_items
=
get_free_header
(
file_path
=
"L
2
/MSC/
094/auto/CSST-MSC-L2-MBI-CAT/254/CSST_MSC_MS_SCI_20310423084104_203104230843
34_10109
4
00
638867_12
_L
2
_V01
_CATMIX
.fits"
)
print
(
header_items
)
print
(
header_items
)
\ No newline at end of file
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