예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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]))
예제 #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))
예제 #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]))
예제 #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]))
예제 #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]))
예제 #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]))
예제 #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]))