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

update

parent 7ebf268c
Loading
Loading
Loading
Loading
+91 −135
Original line number Diff line number Diff line
@@ -40,184 +40,140 @@ class TestDemoFunction(unittest.TestCase):
        
        d=csst_ifs_sim(dir_path)
        
        self.assertTrue(
            d == 1,
        self.assertEqual(
            d , 1,
            "case 1: SCI sim passes.",
        )
        
        
    def test_ifs_sim_2(self):
        """
        Aim
        ---
        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
        --------
        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,'DARK')
        
        self.assertTrue(
            1 == 1,
            "case 3 :DARK sim passes.",
        )
        
        
        
    def test_ifs_sim_4(self):
        """
        Aim
        ---
        Test ifs sim function: LAMP case.
    # def test_ifs_sim_2(self):
    #     """
    #     Aim
    #     ---
    #     Test ifs sim function: BIAS case.

        Criteria
        --------
        Pass if the demo function returns `1`.
    #     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')
    #     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')
    #     csst_ifs_sim(dir_path,BIAS)
        
        self.assertTrue(
            1 == 1,
            "case 4 :LAMP sim passes.",
        )
    #     self.assertTrue(
    #         1 == 1,
    #         "case 2 :BIAS sim passes.",
    #     )
        
    # def test_ifs_sim_3(self):
    #     """
    #     Aim
    #     ---
    #     Test ifs sim function: DARK case.

    #     Criteria
    #     --------
    #     Pass if the demo function returns `1`.

    def test_ifs_sim_5(self):
        """
        Aim
        ---
        Test ifs sim function: FLAT case.
    #     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')
        
        Criteria
        --------
        Pass if the demo function returns `1`.
    #     csst_ifs_sim(dir_path,'DARK')
        
        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')
    #     self.assertTrue(
    #         1 == 1,
    #         "case 3 :DARK sim passes.",
    #     )
        
        csst_ifs_sim(dir_path,'FLAT')
        
        self.assertTrue(
            1 == 1,
            "case 5 :FLAT sim passes.",
        )
        
    # def test_ifs_sim_4(self):
    #     """
    #     Aim
    #     ---
    #     Test ifs sim function: LAMP case.

    def test_ifs_sim_6(self):
        """
        Aim
        ---
        Test ifs sim function: hole case.
    #     Criteria
    #     --------
    #     Pass if the demo function returns `1`.

        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')
        
        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')
        
        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
    #     ---
    #     Test demo function.
    #     Test ifs sim function: FLAT case.

    #     Criteria
    #     --------
    #     Pass if the demo function returns `2`.
    #     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 `2` if input is `None, None`.
    #     This case aims to test whether the demo function returns `1` if input is `None`.
    #     """
    #     # demo function test
    #     self.assertEqual(
    #         demo_function(None, None),
    #         2,
    #         "Double-argument case failed.",
    #     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_demo_function_bad_case(self):
        
    # def test_ifs_sim_6(self):
    #     """
    #     Aim
    #     ---
    #     Test demo function in bad case.
    #     Test ifs sim function: hole case.
    
    #     Criteria
    #     --------
    #     Pass if the demo function result is not equal to `2`.
    #     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 result is not equal to `2`
    #     if input is `None, None, None`.
    #     This case aims to test whether the demo function returns `1` if input is `None`.
    #     """
    #     # demo function test
    #     self.assertNotEqual(
    #         demo_function(None, None, None),
    #         2,
    #         "Triple-argument case failed.",
    #     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 6 :Hole sim passes.",
    #     )
        
      
 No newline at end of file