Skip to content

Commit

Permalink
Test install from PyPI with fast-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Jul 18, 2020
1 parent 7492941 commit beeb60d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/functional/test_fast_deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import json

from pip._vendor.packaging.utils import canonicalize_name
from pytest import mark


def assert_installed(script, names):
list_output = json.loads(script.pip('list', '--format=json').stdout)
installed = {canonicalize_name(item['name']) for item in list_output}
assert installed.issuperset(map(canonicalize_name, names))


@mark.network
@mark.parametrize(('req', 'expected'), (
('Paste==3.4.2', ('Paste', 'six')),
('Paste[flup]==3.4.2', ('Paste', 'six', 'flup')),
))
def test_install_from_pypi(req, expected, script):
script.pip(
'install', '--use-feature=fast-deps',
req, allow_stderr_warning=True,
)
assert_installed(script, expected)

0 comments on commit beeb60d

Please sign in to comment.