Skip to content

Commit beeb60d

Browse files
committed
Test install from PyPI with fast-deps
1 parent 7492941 commit beeb60d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/functional/test_fast_deps.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import json
2+
3+
from pip._vendor.packaging.utils import canonicalize_name
4+
from pytest import mark
5+
6+
7+
def assert_installed(script, names):
8+
list_output = json.loads(script.pip('list', '--format=json').stdout)
9+
installed = {canonicalize_name(item['name']) for item in list_output}
10+
assert installed.issuperset(map(canonicalize_name, names))
11+
12+
13+
@mark.network
14+
@mark.parametrize(('req', 'expected'), (
15+
('Paste==3.4.2', ('Paste', 'six')),
16+
('Paste[flup]==3.4.2', ('Paste', 'six', 'flup')),
17+
))
18+
def test_install_from_pypi(req, expected, script):
19+
script.pip(
20+
'install', '--use-feature=fast-deps',
21+
req, allow_stderr_warning=True,
22+
)
23+
assert_installed(script, expected)

0 commit comments

Comments
 (0)