def test_run_eg_opens_editor():
    """
    If the user requests an edit we should open the editor.
    """
    args = _create_mock_args(program='awk', edit=True)
    config_with_editor = _create_config(editor_cmd='vi -e')
    _helper_run_eg_responds_to_args_correctly(
        args, call_edit_custom=True, resolved_config=config_with_editor
    )

    If the user requests an edit we should open the editor.
    
test/core_test.py