mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #868 from techalchemy/add-pipenv-zipfile-install-test
Introduces a test for PR #818 and issue #817 local sdists
This commit is contained in:
Binary file not shown.
@@ -651,3 +651,27 @@ requests = "==2.14.0"
|
||||
dep = p.lockfile['default'][key]
|
||||
|
||||
assert 'file' in dep
|
||||
|
||||
@pytest.mark.install
|
||||
@pytest.mark.files
|
||||
def test_local_zipfiles(self):
|
||||
file_name = 'tablib-0.12.1.tar.gz'
|
||||
# Not sure where travis/appveyor run tests from
|
||||
test_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
source_path = os.path.abspath(os.path.join(test_dir, 'test_artifacts', file_name))
|
||||
|
||||
with PipenvInstance() as p:
|
||||
# This tests for a bug when installing a zipfile in the current dir
|
||||
shutil.copy(source_path, os.path.join(p.path, file_name))
|
||||
|
||||
c = p.pipenv('install {}'.format(file_name))
|
||||
key = [k for k in p.pipfile['packages'].keys()][0]
|
||||
dep = p.pipfile['packages'][key]
|
||||
|
||||
assert 'file' in dep or 'path' in dep
|
||||
assert c.return_code == 0
|
||||
|
||||
key = [k for k in p.lockfile['default'].keys()][0]
|
||||
dep = p.lockfile['default'][key]
|
||||
|
||||
assert 'file' in dep or 'path' in dep
|
||||
|
||||
Reference in New Issue
Block a user