示例#1
0
def test_invalid_markers():
    with raises(ValueError, match='Invalid marker'):
        parse_requires(data_file('invalid_markers.txt'))
示例#2
0
def test_abs_include():
    assert parse_requires(data_file('base_abs.txt')) == ['httplib2', 'lxml']
示例#3
0
def test_parse_markers(version, expected, monkeypatch):
    monkeypatch.setattr('jnrbase.pip_support.version_info', version)
    assert parse_requires(data_file('markers.txt')) == expected
示例#4
0
def test_comment_skipping():
    assert parse_requires(data_file('comments.txt')) == ['httplib2', 'lxml']
示例#5
0
def test_empty_parse():
    assert parse_requires(data_file('empty.txt')) == []
示例#6
0
文件: cmdline.py 项目: JNRowe/jnrbase
def pip_requires(name: str):
    """Parse pip requirements file."""
    requires = pip_support.parse_requires(name)
    for req in requires:
        echo(req)
示例#7
0
def test_include():
    expect(parse_requires(data_file('base.txt'))) == ['httplib2', 'lxml']
示例#8
0
def test_empty_parse():
    expect(parse_requires(data_file('empty.txt'))) == []