def _helper_assert_about_invocation(
    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
):
    with patch('sys.argv', argv):
        with patch('argparse.ArgumentParser.print_help') as mock_help:
            with patch('eg.core._show_list_message') as mock_show_list:
                with patch('eg.core._show_version') as mock_version:
                    with patch('eg.util.handle_program') as mock_handle:
                        with patch(
                            'eg.config.get_resolved_config_items',
                            return_value=resolved_config
                        ) as mock_resolve_config:
                            with patch(
                                'eg.core._handle_insufficient_args'
                            ) as mock_bad_args:
                                core.run_eg()

                                assert_equal(
                                    mock_help.call_count,
                                    num_print_help_calls
                                )
                                assert_equal(
                                    mock_version.call_count,
                                    num_show_version_calls
                                )
                                assert_equal(
                                    mock_bad_args.call_count,
                                    num_handle_insufficient_args_calls
                                )

                                should_resolve_config = False

                                if num_show_version_calls > 0:
                                    should_resolve_config = True

                                if num_show_list_calls > 0:
                                    should_resolve_config = True
                                    mock_show_list.assert_called_once_with(
                                        resolved_config
                                    )
                                else:
                                    assert_equal(mock_show_list.call_count, 0)

                                if num_handle_program_calls > 0:
                                    should_resolve_config = True
                                    mock_handle.assert_called_once_with(
                                        *handle_program_args
                                    )
                                else:
                                    assert_equal(mock_handle.call_count, 0)

                                if should_resolve_config:
                                    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
                                    )
                                else:
                                    assert_equal(
                                        mock_resolve_config.call_count,
                                        0
                                    )
Tests the NewFileSystem function.
dataset/ETHPy150Open srsudar/eg/test/core_test.py/_helper_assert_about_invocation--crossover with--dataset/ETHPy150Open log2timeline/dfvfs/tests/resolver/tsk_partition_resolver_helper.py/TSKPartitionResolverHelperTest.testNewFileSystem