Beispiel #1
0
    def test_empty_optconreqlist(self):
        """Function:  test_empty_optconreqlist

        Description:  Test with empty list for opt_con_req_list.

        Arguments:

        """

        self.assertTrue(
            arg_parser.arg_cond_req_or(self.args_array2,
                                       self.opt_con_req_dict))
Beispiel #2
0
    def test_multi_cond_req(self):
        """Function:  test_multi_cond_req

        Description:  Test with multiple conditional requirements present.

        Arguments:

        """

        self.assertTrue(
            arg_parser.arg_cond_req_or(self.args_array5,
                                       self.opt_con_req_dict5))
Beispiel #3
0
    def test_one_arg_present(self):
        """Function:  test_one_arg_present

        Description:  Test with one argument is present.

        Arguments:

        """

        self.assertTrue(
            arg_parser.arg_cond_req_or(self.args_array3,
                                       self.opt_con_req_dict2))
Beispiel #4
0
    def test_two_args_present(self):
        """Function:  test_two_args_present

        Description:  Test with two arguments are present.

        Arguments:

        """

        self.assertTrue(
            arg_parser.arg_cond_req_or(self.args_array4,
                                       self.opt_con_req_dict3))
Beispiel #5
0
    def test_two_cond_req(self):
        """Function:  test_two_cond_req

        Description:  Test with two conditional requirements.

        Arguments:

        """

        self.assertTrue(
            arg_parser.arg_cond_req_or(self.args_array4,
                                       self.opt_con_req_dict4))
Beispiel #6
0
    def test_multi_cond_req2(self):
        """Function:  test_multi_cond_req2

        Description:  Test with multiple conditional requirements, one missing.

        Arguments:

        """

        with gen_libs.no_std_out():
            status = arg_parser.arg_cond_req_or(self.args_array6,
                                                self.opt_con_req_dict6)

        self.assertFalse(status)
Beispiel #7
0
    def test_empty_argsarray(self):
        """Function:  test_empty_argsarray

        Description:  Test with empty list for def_array.

        Arguments:

        """

        with gen_libs.no_std_out():
            status = arg_parser.arg_cond_req_or(self.args_array,
                                                self.opt_con_req_dict2)

        self.assertTrue(status)