Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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]))
def test_match(mocker, monkeypatch, test):
    mocker.patch('os.path.isfile', return_value=True)
    monkeypatch.setenv('EDITOR', 'dummy_editor')
    assert match(Command('', test.output))
Exemple #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]))
Exemple #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]))
Exemple #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]))
Exemple #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]))
Exemple #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]))