Skip to content

Commit

Permalink
Add zip artifact and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
techalchemy committed Oct 11, 2017
1 parent 41bb962 commit ac33b55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file added tests/test_artifacts/tablib.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions tests/test_pipenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pipenv.vendor import toml
from pipenv.vendor import delegator
from pipenv.project import Project
import requests

os.environ['PIPENV_DONT_USE_PYENV'] = '1'

Expand Down Expand Up @@ -656,13 +655,14 @@ def test_urls_work(self):
@pytest.mark.install
@pytest.mark.files
def test_local_zipfiles(self):
file_name = 'tablib.zip'
# 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:
zip_contents = requests.get('https://github.com/divio/django-cms/archive/release/3.4.x.zip')
file_name = 'django-cms.zip'
target_file = os.path.join(p.path, file_name)
with open(target_file, 'wb') as fh:
fh.write(zip_contents.content)
# 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]
Expand Down

0 comments on commit ac33b55

Please sign in to comment.