Exemplo n.º 1
0
def test_no_editor(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    if 'EDITOR' in os.environ:
        monkeypatch.delenv('EDITOR')

    assert not match(Command(stderr=test[4]), None)
Exemplo n.º 2
0
def test_not_file(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=False)
    monkeypatch.setenv('EDITOR', 'dummy_editor')

    assert not match(Command(stderr=test[4]), None)
Exemplo n.º 3
0
def test_no_editor(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    if 'EDITOR' in os.environ:
        monkeypatch.delenv('EDITOR')

    assert not match(Command(stderr=test[4]), None)
Exemplo n.º 4
0
def test_not_file(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=False)
    monkeypatch.setenv('EDITOR', 'dummy_editor')

    assert not match(Command(stderr=test[4]), None)
Exemplo n.º 5
0
def test_not_file(mocker, monkeypatch, test):
    mocker.patch("os.path.isfile", return_value=False)
    monkeypatch.setenv("EDITOR", "dummy_editor")

    assert not match(Command("", test[4]))
Exemplo n.º 6
0
def test_match(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    monkeypatch.setenv('EDITOR', 'dummy_editor')
    assert match(Command('', test.output))
Exemplo n.º 7
0
def test_no_editor(mocker, monkeypatch, test):
    mocker.patch("os.path.isfile", return_value=True)
    if "EDITOR" in os.environ:
        monkeypatch.delenv("EDITOR")

    assert not match(Command("", test[4]))
Exemplo n.º 8
0
def test_not_file(mocker, monkeypatch, test):
    mocker.patch("os.path.isfile", return_value=False)
    monkeypatch.setenv("EDITOR", "dummy_editor")

    assert not match(Command(stdout=test[4], stderr=test[5]))
Exemplo n.º 9
0
def test_no_editor(mocker, monkeypatch, test):
    mocker.patch("os.path.isfile", return_value=True)
    if "EDITOR" in os.environ:
        monkeypatch.delenv("EDITOR")

    assert not match(Command(stdout=test[4], stderr=test[5]))
Exemplo n.º 10
0
def test_match(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    monkeypatch.setenv('EDITOR', 'dummy_editor')
    assert match(Command(stdout=test[4], stderr=test[5]))
Exemplo n.º 11
0
def test_match(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    monkeypatch.setenv('EDITOR', 'dummy_editor')
    assert match(Command(stdout=test[4], stderr=test[5]))