Module ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str With Call NameLoad Str NameLoad body With Call NameLoad Str NameStore body With Call NameLoad Str NameStore body With Call NameLoad Str NameStore body With Call NameLoad Str NameStore body With Call NameLoad Str keyword NameLoad NameStore body With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareGt NameLoad Num body Assign NameStore NameLoad If CompareGt NameLoad Num body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr Num If CompareGt NameLoad Num body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr Num If NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Expr Str With Call NameLoad Str ListLoad Str body With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call NameLoad keyword ListLoad Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad keyword ListLoad Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad keyword ListLoad Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad keyword ListLoad Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad keyword ListLoad Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Expr Call NameLoad keyword ListLoad Str Str Str keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Expr Call NameLoad keyword NameLoad keyword Num keyword Num keyword Num keyword Num keyword Num keyword NameLoad keyword ListLoad Str NameLoad keyword Str keyword Str keyword Str keyword NameLoad keyword Str keyword NameLoad decorator_list
N/A eg core mock patch nose.tools assert_equal _helper_assert_about_invocation N/A N/A argv num_print_help_calls num_show_list_calls num_show_version_calls num_handle_program_calls num_handle_insufficient_args_calls resolved_config handle_program_args egrc_path examples_dir custom_dir use_color pager_cmd squeeze N/A N/A N/A 
    Helper method for calling core.run_eg() and making assertions as if it were
    called from the command line.

    argv: an array to be interpreted as argv
    num_print_help_calls: the number of calls to print_help
    num_show_list_calls: the number of calls to _show_list_message. Called with
        resolved_config as a paramter.
    num_show_version_calls: the number of calls to _show_version
    num_handle_program_calls: the number of calls to handle_program
    resolved_config: the resolved config object
    handle_program_args: an array of arguments that will be exploded and passed
        individually to handle_program if num_handle_program_calls > 0
    egrc_path: the path we should parse from the command line
    examples_dir: the examples dir we should parse from the command line
    custom_dir: the custom dir we should parse from the command line
    use_color: the use_color value we should parse from the command line
    pager_cmd: the pager_cmd we should parse from the command line
    squeeze: the squeeze command we should parse from the command line
     N/A N/A patch sys.argv argv N/A N/A N/A patch argparse.ArgumentParser.print_help mock_help N/A N/A N/A patch eg.core._show_list_message mock_show_list N/A N/A N/A patch eg.core._show_version mock_version N/A N/A N/A patch eg.util.handle_program mock_handle N/A N/A N/A patch eg.config.get_resolved_config_items return_value resolved_config mock_resolve_config N/A N/A N/A patch eg.core._handle_insufficient_args mock_bad_args N/A N/A N/A N/A core run_eg N/A N/A assert_equal N/A mock_help call_count num_print_help_calls N/A N/A assert_equal N/A mock_version call_count num_show_version_calls N/A N/A assert_equal N/A mock_bad_args call_count num_handle_insufficient_args_calls N/A should_resolve_config False N/A N/A num_show_version_calls 0 N/A N/A should_resolve_config True N/A N/A num_show_list_calls 0 N/A N/A should_resolve_config True N/A N/A N/A mock_show_list assert_called_once_with resolved_config N/A N/A N/A assert_equal N/A mock_show_list call_count 0 N/A N/A num_handle_program_calls 0 N/A N/A should_resolve_config True N/A N/A N/A mock_handle assert_called_once_with handle_program_args N/A N/A N/A assert_equal N/A mock_handle call_count 0 N/A should_resolve_config N/A N/A N/A N/A mock_resolve_config assert_called_once_with egrc_path egrc_path examples_dir examples_dir custom_dir custom_dir use_color use_color pager_cmd pager_cmd squeeze squeeze N/A N/A N/A assert_equal N/A mock_resolve_config call_count 0 N/A test_fewer_than_two_args_fails N/A N/A N/A N/A N/A 
    You always need at least two arguments in argv: eg and a command.
     N/A N/A patch sys.argv N/A eg N/A N/A N/A patch argparse.ArgumentParser.print_help mock_help N/A N/A N/A N/A core run_eg N/A N/A N/A mock_help assert_called_once_with N/A N/A _helper_assert_about_invocation argv N/A eg num_print_help_calls 1 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 0 num_handle_insufficient_args_calls 0 resolved_config config handle_program_args not applicable egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_shows_version_if_long_version N/A N/A N/A N/A N/A The version of eg should be shown if --version is true. N/A N/A _helper_assert_about_invocation argv N/A eg --version num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 1 num_handle_program_calls 0 num_handle_insufficient_args_calls 0 resolved_config config handle_program_args not applicable egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_shows_version_if_short_version N/A N/A N/A N/A N/A The version of eg should be shown if -v is true. N/A N/A _helper_assert_about_invocation argv N/A eg -v num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 1 num_handle_program_calls 0 num_handle_insufficient_args_calls 0 resolved_config config handle_program_args not applicable egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_and_passes_args_correctly_if_only_program N/A N/A N/A N/A N/A 
    Should parse to the command-line defaults and pass to handle_program if only
    the command is given without any options.
     N/A config_obj config obj N/A N/A _helper_assert_about_invocation argv N/A eg find num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A find config_obj egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_long_list_correctly N/A N/A N/A N/A N/A 
    Args has list == True if passed with --list.
     N/A N/A _helper_assert_about_invocation argv N/A eg --list num_print_help_calls 0 num_show_list_calls 1 num_show_version_calls 0 num_handle_program_calls 0 num_handle_insufficient_args_calls 0 resolved_config config handle_program_args not applicable egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_short_list_correctly N/A N/A N/A N/A N/A 
    Args has list == True if passed with -l.
     N/A N/A _helper_assert_about_invocation argv N/A eg -l num_print_help_calls 0 num_show_list_calls 1 num_show_version_calls 0 num_handle_program_calls 0 num_handle_insufficient_args_calls 0 resolved_config config handle_program_args not applicable egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_long_config_file_correctly N/A N/A N/A N/A N/A 
    Parses the config file path if passed with --config-file.
     N/A config_obj a fancy config N/A N/A _helper_assert_about_invocation argv N/A eg --config-file=path/to/config/file cat num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A cat config_obj egrc_path path/to/config/file examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_short_config_file_correctly N/A N/A N/A N/A N/A 
    Parses the config file path if passed with -f.
     N/A config_obj a fancy config N/A N/A _helper_assert_about_invocation argv N/A eg -f=path/to/config/file cat num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A cat config_obj egrc_path path/to/config/file examples_dir None custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_long_examples_dir_correctly N/A N/A N/A N/A N/A 
    Parses the examples directory if passed with --examples-dir.
     N/A config_obj examples dir config obj N/A N/A _helper_assert_about_invocation argv N/A eg --examples-dir path/to/examples cat num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A cat config_obj egrc_path None examples_dir path/to/examples custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_short_examples_dir_correctly N/A N/A N/A N/A N/A 
    Parses the examples directory if passed with -e.
     N/A config_obj examples dir config obj N/A N/A _helper_assert_about_invocation argv N/A eg -e path/to/examples cat num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A cat config_obj egrc_path None examples_dir path/to/examples custom_dir None use_color None pager_cmd None squeeze None N/A test_parses_long_custom_dir_correctly N/A N/A N/A N/A N/A 
    Parses the custom directory if passed with --custom-dir.
     N/A config_obj custom dir config obj N/A N/A _helper_assert_about_invocation argv N/A eg --custom-dir path/to/custom file num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A file config_obj egrc_path None examples_dir None custom_dir path/to/custom use_color None pager_cmd None squeeze None N/A test_parses_short_custom_dir_correctly N/A N/A N/A N/A N/A 
    Parses the custom directory if passed with -c.
     N/A config_obj custom dir config obj N/A N/A _helper_assert_about_invocation argv N/A eg -c path/to/custom file num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A file config_obj egrc_path None examples_dir None custom_dir path/to/custom use_color None pager_cmd None squeeze None N/A test_parses_long_squeeze_dir_correctly N/A N/A N/A N/A N/A 
    Parses squeeze if passed with --squeeze.
     N/A config_obj squeeze config obj N/A N/A _helper_assert_about_invocation argv N/A eg --squeeze ls num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A ls config_obj egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze True N/A test_parses_short_squeeze_dir_correctly N/A N/A N/A N/A N/A 
    Parses squeeze is passed with -s.
     N/A config_obj squeeze config obj N/A N/A _helper_assert_about_invocation argv N/A eg -s ls num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A ls config_obj egrc_path None examples_dir None custom_dir None use_color None pager_cmd None squeeze True N/A test_parses_long_pager_cmd_correctly N/A N/A N/A N/A N/A 
    Parses pager_cmd if passed with --pager-cmd.
     N/A config_obj pager cmd config obj N/A N/A _helper_assert_about_invocation argv N/A eg --pager-cmd less -R echo num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A echo config_obj egrc_path None examples_dir None custom_dir None use_color None pager_cmd less -R squeeze None N/A test_parses_short_pager_cmd_correctly N/A N/A N/A N/A N/A 
    Parses pager_cmd if passed with -p.
     N/A config_obj pager cmd config obj N/A N/A _helper_assert_about_invocation argv N/A eg -p less -R echo num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A echo config_obj egrc_path None examples_dir None custom_dir None use_color None pager_cmd less -R squeeze None N/A test_parses_color N/A N/A N/A N/A N/A 
    Parses --color.
     N/A config_obj color config obj N/A N/A _helper_assert_about_invocation argv N/A eg --color whereis num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A whereis config_obj egrc_path None examples_dir None custom_dir None use_color True pager_cmd None squeeze None N/A test_parses_no_color N/A N/A N/A N/A N/A 
    Parses --no-color.
     N/A config_obj no color config obj N/A N/A _helper_assert_about_invocation argv N/A eg --no-color free num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A free config_obj egrc_path None examples_dir None custom_dir None use_color False pager_cmd None squeeze None N/A test_parses_all_valid_options_simultaneously N/A N/A N/A N/A N/A 
    Parses a large number of valid options at the same time.
     N/A config_obj all valid options config object N/A argv N/A eg --config-file=path/to/config/file --examples-dir path/to/examples -c path/to/custom --squeeze --no-color --pager-cmd less -R du N/A N/A _helper_assert_about_invocation argv argv num_print_help_calls 0 num_show_list_calls 0 num_show_version_calls 0 num_handle_program_calls 1 num_handle_insufficient_args_calls 0 resolved_config config_obj handle_program_args N/A du config_obj egrc_path path/to/config/file examples_dir path/to/examples custom_dir path/to/custom use_color False pager_cmd less -R squeeze True N/A