def test_optvalset_two_arg(self): """Function: test_optvalset_two_arg Description: Test with opt_val_set set to two arguments. Arguments: """ self.argv = ["-c", "merge", "-d", "config"] self.assertEqual( arg_parser._parse_single(self.argv, {}, self.opt_val_list, []), (["merge", "-d", "config"], { "-c": "merge" }))
def test_optvalset_arg_int(self): """Function: test_optvalset_arg_int Description: Test with opt_val_set set to integer value. Arguments: """ self.argv = ["-c", "-1"] self.assertEqual( arg_parser._parse_single(self.argv, {}, self.opt_val_list, []), (["-1"], { "-c": "-1" }))
def test_optval_set(self): """Function: test_optval_set Description: Test with opt_val set with no value in arg. Arguments: """ self.argv = ["-d"] self.assertEqual( arg_parser._parse_single(self.argv, {}, self.opt_val_list, opt_val=self.opt_val), (["-d"], { "-d": None }))