Home | History | Annotate | Download | only in test

Lines Matching refs:def

30     def __init__(self,
38 def __str__(self):
42 def exit(self, status=0, msg=None):
45 def error(self, msg):
50 def assertParseOK(self, args, expected_opts, expected_positional_args):
80 def assertRaises(self,
139 def assertParseFail(self, cmdline_args, expected_output):
151 def assertOutput(self,
183 def assertTypeError(self, func, expected_message, *args):
187 def assertHelp(self, parser, expected_help):
202 def setUp(self):
205 def assertOptionError(self, expected_message, args=[], kwargs={}):
209 def test_opt_string_empty(self):
213 def test_opt_string_too_short(self):
218 def test_opt_string_short_invalid(self):
224 def test_opt_string_long_invalid(self):
230 def test_attr_invalid(self):
235 def test_action_invalid(self):
240 def test_type_invalid(self):
248 def test_no_type_for_action(self):
253 def test_no_choices_list(self):
259 def test_bad_choices_list(self):
267 def test_no_choices_for_type(self):
272 def test_no_const_for_action(self):
277 def test_no_nargs_for_action(self):
282 def test_callback_not_callable(self):
288 def dummy(self):
291 def test_callback_args_no_tuple(self):
299 def test_callback_kwargs_no_dict(self):
307 def test_no_callback_for_action(self):
313 def test_no_callback_args_for_action(self):
319 def test_no_callback_kwargs_for_action(self):
326 def setUp(self):
333 def test_add_option_no_Option(self):
337 def test_add_option_invalid_arguments(self):
341 def test_get_option(self):
349 def test_get_option_equals(self):
356 def test_has_option(self):
360 def assertTrueremoved(self):
374 def test_remove_short_opt(self):
378 def test_remove_long_opt(self):
382 def test_remove_nonexistent(self):
386 def test_refleak(self):
404 def setUp(self):
407 def test_basics(self):
425 def setUp(self):
428 def test_str_aliases_string(self):
432 def test_new_type_object(self):
438 def test_old_type_object(self):
448 def _check_duration(option, opt, value):
464 def setUp(self):
480 def test_basic_defaults(self):
483 def test_mixed_defaults_post(self):
488 def test_mixed_defaults_pre(self):
501 def test_process_default(self):
520 def assertUsage(self, parser, expected_usage):
523 def assertVersion(self, parser, expected_version):
527 def test_default_progname(self):
544 def test_custom_progname(self):
557 def setUp(self):
571 def test_option_default(self):
577 def test_parser_default_1(self):
583 def test_parser_default_2(self):
589 def test_no_default(self):
594 def test_default_none_1(self):
600 def test_default_none_2(self):
606 def test_float_default(self):
615 def test_alt_expand(self):
622 def test_no_expand(self):
635 def setUp(self):
643 def test_required_value(self):
646 def test_invalid_integer(self):
650 def test_no_such_option(self):
653 def test_long_invalid_integer(self):
657 def test_empty(self):
660 def test_shortopt_empty_longopt_append(self):
665 def test_long_option_append(self):
672 def test_option_argument_joined(self):
677 def test_option_argument_split(self):
682 def test_option_argument_joined_integer(self):
687 def test_option_argument_split_negative_integer(self):
692 def test_long_option_argument_joined(self):
697 def test_long_option_argument_split(self):
702 def test_long_option_short_option(self):
707 def test_abbrev_long_option(self):
712 def test_defaults(self):
717 def test_ambiguous_option(self):
724 def test_short_and_long_option_split(self):
729 def test_short_option_split_long_option_append(self):
734 def test_short_option_split_one_positional_arg(self):
739 def test_short_option_consumes_separator(self):
747 def test_short_option_joined_and_separator(self):
752 def test_hyphen_becomes_positional_arg(self):
757 def test_no_append_versus_append(self):
762 def test_option_consumes_optionlike_string(self):
767 def test_combined_single_invalid_option(self):
772 def test_add_option_accepts_unicode(self):
780 def setUp(self):
792 def test_bool_default(self):
797 def test_bool_false(self):
803 def test_bool_true(self):
809 def test_bool_flicker_on_and_off(self):
815 def setUp(self):
820 def test_valid_choice(self):
825 def test_invalid_choice(self):
830 def test_add_choice_option(self):
838 def setUp(self):
846 def test_empty(self):
849 def test_count_one(self):
852 def test_count_three(self):
855 def test_count_three_apart(self):
858 def test_count_override_amount(self):
861 def test_count_override_quiet(self):
864 def test_count_overriding(self):
868 def test_count_interspersed_args(self):
873 def test_count_no_interspersed_args(self):
879 def test_count_no_such_option(self):
882 def test_count_option_no_value(self):
886 def test_count_with_default(self):
890 def test_count_overriding_default(self):
896 def setUp(self):
901 def test_nargs_with_positional_args(self):
906 def test_nargs_long_opt(self):
911 def test_nargs_invalid_float_value(self):
916 def test_nargs_required_values(self):
921 def setUp(self):
930 def test_nargs_append(self):
935 def test_nargs_append_required_values(self):
939 def test_nargs_append_simple(self):
944 def test_nargs_append_const(self):
950 def test_version(self):
960 def test_no_version(self):
969 def setUp(self):
973 def test_conflict_default(self):
978 def test_conflict_default_none(self):
984 def setUp(self):
987 def test_option_group_create_instance(self):
994 def test_add_group_no_group(self):
998 def test_add_group_invalid_arguments(self):
1002 def test_add_group_wrong_parser(self):
1008 def test_group_manipulate(self):
1018 def setUp(self):
1024 def tearDown(self):
1031 def check_file(option, opt, value):
1042 def test_filetype_ok(self):
1048 def test_filetype_noexist(self):
1053 def test_filetype_notfile(self):
1061 def setUp(self):
1071 def take_action(self, action, dest, opt, value, values, parser):
1079 def test_extend_add_action(self):
1084 def test_extend_add_action_normal(self):
1092 def setUp(self):
1105 def process_opt(self, option, opt, value, parser_):
1125 def test_callback(self):
1130 def test_callback_help(self):
1146 def setUp(self):
1153 def process_tuple(self, option, opt, value, parser_, len, type):
1165 def test_callback_extra_args(self):
1171 def setUp(self):
1178 def process_n(self, option, opt, value, parser_):
1189 def test_callback_meddle_args(self):
1194 def test_callback_meddle_args_separator(self):
1200 def setUp(self):
1207 def process_many(self, option, opt, value, parser_):
1217 def test_many_args(self):
1225 def setUp(self):
1230 def check_abbrev(self, option, opt, value, parser):
1233 def test_abbrev_callback_expansion(self):
1237 def setUp(self):
1245 def variable_args(self, option, opt, value, parser):
1259 def test_variable_args(self):
1264 def test_consume_separator_stop_at_option(self):
1271 def test_positional_arg_and_variable_args(self):
1278 def test_stop_at_option(self):
1283 def test_stop_at_invalid_option(self):
1290 def setUp(self):
1296 def show_version(self, option, opt, value, parser):
1301 def assertTrueconflict_error(self, func):
1312 def test_conflict_error(self):
1315 def test_conflict_error_group(self):
1319 def test_no_such_conflict_handler(self):
1326 def setUp(self):
1332 def test_conflict_resolve(self):
1345 def test_conflict_resolve_help(self):
1353 def test_conflict_resolve_short_opt(self):
1358 def test_conflict_resolve_long_opt(self):
1363 def test_conflict_resolve_long_opts(self):
1369 def setUp(self):
1379 def test_conflict_override_opts(self):
1384 def test_conflict_override_help(self):
1391 def test_conflict_override_args(self):
1448 def setUp(self):
1451 def make_parser(self, columns):
1472 def assertHelpEquals(self, expected_output):
1485 def test_help(self):
1488 def test_help_old_usage(self):
1492 def test_help_long_opts_first(self):
1496 def test_help_title_formatter(self):
1502 def test_wrap_columns(self):
1509 def test_help_unicode(self):
1519 def test_help_unicode_description(self):
1530 def test_help_description_groups(self):
1569 def test_match_abbrev(self):
1577 def test_match_abbrev_error(self):
1586 def setUp(self):
1591 def test_parse_num_fail(self):
1601 def test_parse_num_ok(self):
1609 def test_numeric_options(self):
1622 def test_main():