Commit d20c930d authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

update

parent 7ebf268c
...@@ -40,184 +40,140 @@ class TestDemoFunction(unittest.TestCase): ...@@ -40,184 +40,140 @@ class TestDemoFunction(unittest.TestCase):
d=csst_ifs_sim(dir_path) d=csst_ifs_sim(dir_path)
self.assertTrue( self.assertEqual(
d == 1, d , 1,
"case 1: SCI sim passes.", "case 1: SCI sim passes.",
) )
def test_ifs_sim_2(self): # def test_ifs_sim_2(self):
""" # """
Aim # Aim
--- # ---
Test ifs sim function: BIAS case. # Test ifs sim function: BIAS case.
Criteria
--------
Pass if the demo function returns `1`.
Details
-------
The demo function returns the length of the input argument list.
This case aims to test whether the demo function returns `1` if input is `None`.
"""
# demo function test
dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
csst_ifs_sim(dir_path,BIAS)
self.assertTrue(
1 == 1,
"case 2 :BIAS sim passes.",
)
def test_ifs_sim_3(self):
"""
Aim
---
Test ifs sim function: DARK case.
Criteria # Criteria
-------- # --------
Pass if the demo function returns `1`. # Pass if the demo function returns `1`.
Details # Details
------- # -------
The demo function returns the length of the input argument list. # The demo function returns the length of the input argument list.
This case aims to test whether the demo function returns `1` if input is `None`. # This case aims to test whether the demo function returns `1` if input is `None`.
""" # """
# demo function test # # demo function test
dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim') # dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
csst_ifs_sim(dir_path,'DARK')
self.assertTrue(
1 == 1,
"case 3 :DARK sim passes.",
)
# csst_ifs_sim(dir_path,BIAS)
# self.assertTrue(
# 1 == 1,
# "case 2 :BIAS sim passes.",
# )
def test_ifs_sim_4(self): # def test_ifs_sim_3(self):
""" # """
Aim # Aim
--- # ---
Test ifs sim function: LAMP case. # Test ifs sim function: DARK case.
Criteria # Criteria
-------- # --------
Pass if the demo function returns `1`. # Pass if the demo function returns `1`.
Details # Details
------- # -------
The demo function returns the length of the input argument list. # The demo function returns the length of the input argument list.
This case aims to test whether the demo function returns `1` if input is `None`. # This case aims to test whether the demo function returns `1` if input is `None`.
""" # """
# demo function test # # demo function test
dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim') # dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
csst_ifs_sim(dir_path,'LAMP') # csst_ifs_sim(dir_path,'DARK')
self.assertTrue( # self.assertTrue(
1 == 1, # 1 == 1,
"case 4 :LAMP sim passes.", # "case 3 :DARK sim passes.",
) # )
def test_ifs_sim_5(self): # def test_ifs_sim_4(self):
""" # """
Aim # Aim
--- # ---
Test ifs sim function: FLAT case. # Test ifs sim function: LAMP case.
Criteria # Criteria
-------- # --------
Pass if the demo function returns `1`. # Pass if the demo function returns `1`.
Details # Details
------- # -------
The demo function returns the length of the input argument list. # The demo function returns the length of the input argument list.
This case aims to test whether the demo function returns `1` if input is `None`. # This case aims to test whether the demo function returns `1` if input is `None`.
""" # """
# demo function test # # demo function test
dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim') # dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
csst_ifs_sim(dir_path,'FLAT')
self.assertTrue(
1 == 1,
"case 5 :FLAT sim passes.",
)
def test_ifs_sim_6(self): # csst_ifs_sim(dir_path,'LAMP')
"""
Aim
---
Test ifs sim function: hole case.
Criteria
--------
Pass if the demo function returns `1`.
Details
-------
The demo function returns the length of the input argument list.
This case aims to test whether the demo function returns `1` if input is `None`.
"""
# demo function test
dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
csst_ifs_sim(dir_path,'LAMP', 'yes') # self.assertTrue(
# 1 == 1,
# "case 4 :LAMP sim passes.",
# )
self.assertTrue(
1 == 1,
"case 6 :Hole sim passes.",
)
# def test_demo_function_2(self): # def test_ifs_sim_5(self):
# """ # """
# Aim # Aim
# --- # ---
# Test demo function. # Test ifs sim function: FLAT case.
# Criteria # Criteria
# -------- # --------
# Pass if the demo function returns `2`. # Pass if the demo function returns `1`.
# Details # Details
# ------- # -------
# The demo function returns the length of the input argument list. # The demo function returns the length of the input argument list.
# This case aims to test whether the demo function returns `2` if input is `None, None`. # This case aims to test whether the demo function returns `1` if input is `None`.
# """ # """
# # demo function test # # demo function test
# self.assertEqual( # dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
# demo_function(None, None),
# 2, # csst_ifs_sim(dir_path,'FLAT')
# "Double-argument case failed.",
# self.assertTrue(
# 1 == 1,
# "case 5 :FLAT sim passes.",
# ) # )
# def test_demo_function_bad_case(self):
# def test_ifs_sim_6(self):
# """ # """
# Aim # Aim
# --- # ---
# Test demo function in bad case. # Test ifs sim function: hole case.
# Criteria # Criteria
# -------- # --------
# Pass if the demo function result is not equal to `2`. # Pass if the demo function returns `1`.
# Details # Details
# ------- # -------
# The demo function returns the length of the input argument list. # The demo function returns the length of the input argument list.
# This case aims to test whether the demo function result is not equal to `2` # This case aims to test whether the demo function returns `1` if input is `None`.
# if input is `None, None, None`.
# """ # """
# # demo function test # # demo function test
# self.assertNotEqual( # dir_path=os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'ifs_sim')
# demo_function(None, None, None),
# 2, # csst_ifs_sim(dir_path,'LAMP', 'yes')
# "Triple-argument case failed.",
# ) # self.assertTrue(
\ No newline at end of file # 1 == 1,
# "case 6 :Hole sim passes.",
# )
\ No newline at end of file
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