summaryrefslogtreecommitdiff
path: root/tests/test_file_scheme_index.py
blob: 38f6654b9244ec6c7036177a7b646108ae42a4d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from pip.backwardcompat import urllib
from tests.test_pip import here, reset_env, run_pip, pyversion
from tests.path import Path

index_url = 'file://' + urllib.quote(str(Path(here).abspath/'in dex').replace('\\', '/'))


def test_install():
    """
    Test installing from a local index.

    """
    env = reset_env()
    result = run_pip('install', '-vvv', '--index-url', index_url, 'FSPkg', expect_error=False)
    assert (env.site_packages/'fspkg') in result.files_created, str(result.stdout)
    assert (env.site_packages/'FSPkg-0.1dev-py%s.egg-info' % pyversion) in result.files_created, str(result)