Exemplo n.º 1
0
def test_config_git(git_repo):
    """Check that `nbime config-git` command works"""

    main_dispatch(['config-git', '--enable'])

    _check_diffdriver_enabled()
    _check_difftool_enabled()
    _check_mergedriver_enabled()
    _check_mergetool_enabled()

    main_dispatch(['config-git', '--disable'])

    _check_diffdriver_disabled()
    _check_difftool_disabled()
    _check_mergedriver_disabled()
    _check_mergetool_disabled()
Exemplo n.º 2
0
def test_config_git(git_repo):
    """Check that `nbime config-git` command works"""

    main_dispatch(['config-git', '--enable'])

    _check_diffdriver_enabled()
    _check_difftool_enabled()
    _check_mergedriver_enabled()
    _check_mergetool_enabled()

    main_dispatch(['config-git', '--disable'])

    _check_diffdriver_disabled()
    _check_difftool_disabled()
    _check_mergedriver_disabled()
    _check_mergetool_disabled()
Exemplo n.º 3
0
def test_config_git_fails(git_repo):
    """Check that `nbime config-git` command fails given invalid option"""
    # Check that it either gives non-zero return code (or exit code)
    try:
        code = main_dispatch(['config-git', '--foo'])
        assert code != 0
    except SystemExit as e:
        assert e.code != 0
    finally:
        _check_diffdriver_disabled()
        _check_difftool_disabled()
        _check_mergedriver_disabled()
        _check_mergetool_disabled()
Exemplo n.º 4
0
def test_config_git_fails(git_repo):
    """Check that `nbime config-git` command fails given invalid option"""
    # Check that it either gives non-zero return code (or exit code)
    try:
        code = main_dispatch(['config-git', '--foo'])
        assert code != 0
    except SystemExit as e:
        assert e.code != 0
    finally:
        _check_diffdriver_disabled()
        _check_difftool_disabled()
        _check_mergedriver_disabled()
        _check_mergetool_disabled()