diff --git a/tests/test_artifacts/tablib-0.12.1.tar.gz b/tests/test_artifacts/tablib-0.12.1.tar.gz new file mode 100644 index 00000000..825ee278 Binary files /dev/null and b/tests/test_artifacts/tablib-0.12.1.tar.gz differ diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 80491eeb..22c08809 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -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