Esempio n. 1
0
def test_pip_error(tmpdir, capsys):
    req_in = tmpdir.join('req.in')
    req_in.write("non-existent")
    with pytest.raises(Abort):
        install_and_freeze(str(req_in))
    out, err = capsys.readouterr()
    assert 'No distributions at all found for non-existent' in err
Esempio n. 2
0
def test_pip_error(tmpdir, capsys):
    req_in = tmpdir.join('req.in')
    req_in.write("non-existent")
    with pytest.raises(Abort):
        install_and_freeze(str(req_in))
    out, err = capsys.readouterr()
    assert 'No distributions at all found for non-existent' in err
Esempio n. 3
0
def test_install_and_freeze(req_in):
    pinned = install_and_freeze(req_in)
    stripped_reqs = [req.split('=')[0] for req in pinned]
    assert stripped_reqs == [
        'Flask',
        'itsdangerous',
        'Jinja2',
        'MarkupSafe',
        'Werkzeug',
    ]
Esempio n. 4
0
def test_install_and_freeze(req_in):
    pinned = install_and_freeze(req_in)
    stripped_reqs = [req.split('=')[0] for req in pinned]
    assert stripped_reqs == [
        'Flask',
        'itsdangerous',
        'Jinja2',
        'MarkupSafe',
        'Werkzeug',
    ]