Commit Graph

337 Commits

Author SHA1 Message Date
Frost Ming 284bd24204 Tweak the test case to reflect correct behavior 2020-08-27 21:15:46 +08:00
Frost Ming 593a56625c skip specific case on py27 2020-08-12 21:10:07 +08:00
Frost Ming 4f7bb36f92 Correct the exception to PipenvUsageError 2020-06-06 10:59:29 +08:00
Marcin 09a71e7c2c Fix --all-dev behaviour 2020-06-03 04:45:39 +02:00
Gordon P. Hemsley 873beae567 #4278: Don't pin wildcard versions in lockfile
Fixes bug introduced by 552d1274ea,
which activated the (unused) changes made much earlier in
a08a2da524.
2020-05-29 00:01:12 -04:00
Gordon P. Hemsley 0add59f499 #4279: Stop test_ssh_vcs_install from failing
Remove expectation of `version` key in `test_ssh_vcs_install` to
stop it from failing.

Mirrors similar change to `test_git_vcs_install` in
243b4fd0df.
2020-05-28 12:48:28 -04:00
Dan Ryan 243b4fd0df VCS version key removal
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 14:47:56 -04:00
Dan Ryan 07a7c6110f Remove version from VCS lock keys
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 14:23:01 -04:00
Dan Ryan befb29ceae Update requirement parser and lockfile generation for vcs dependencies, fix test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 13:36:23 -04:00
Dan Ryan c4f6b7f6f4 use normalized names in lockfile
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 10:53:00 -04:00
Dan Ryan 1f96b8cf7d Fix package name in test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan 1a8111d4bb Clean up tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan a0f82865f8 Add tests for VCS pep508 subdependencies
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan ad7a514563 Fix test that has been broken for who knows how long...
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:32 -04:00
Dan Ryan c7425e7508 Skip tests that build extensions on windows
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-09 10:55:01 -04:00
Dan Ryan 47aa2acc90 Set build_isolation and use_pep517 correctly
- Fix how `use_pep517` and `build_isolation` are read from the
  environment -- introduce a new environment helper to detect
  `<PREFIX>_<SETTING>` and `<PREFIX>_NO_<SETTING>`, check for booleans
  and return appropriately boolean, str, or None types
- Check for `False` values when adding `--no-use-pep517` and
  `--no-build-isolation` during resolution rather than falsey values
- Change environment variable name from `PIP_PYTHON_VERSION` to
  `PIPENV_REQUESTED_PYTHON_VERSION` to avoid causing `pip` to fail due
  to accidentally percieving the `python_version` flag as being set --
  this is an artifact from attempting to resolve outside of the
  virtualenv
- Add `pipenv` to the path of patched `notpip.__main__` to accommodate
  updated import fully qualified module names
- Update `pip` and `piptools` patches
- Add test packages for each of two known failure modes: outdated
  `setuptools` with a missing `build-backend` (which `pip` forces to
  `build_meta:__legacy__` & which doesn't exist before `40.8`), and
  `import Cython` statements in `setup.py` in packages with properly
  defined `pyproject.toml` `build-backend` lines.
- Fixes #4231
- Replaces, includes, and closes #4242

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>

Add integration tests for #4231

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-08 21:43:32 -04:00
Dan Ryan c30155ff45 Fix recursive PEP 508 VCS resolution
- Recursively resolve PEP 508 URLs in subdependencies
  - Fix `piptools` cache storage of VCS dependencies as results
- Avoid saving VCS dependency versions to `Pipfile.lock`
- Fixes #3396
- Fixes #4217

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-05 23:44:34 -04:00
frostming a77e329341 Use the version in mocked PyPI 2020-04-30 10:45:43 +08:00
frostming 8162a22bca add a test case 2020-04-30 09:49:13 +08:00
Dan Ryan c19435e6da Fix relative path issue during tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-28 11:47:16 -04:00
TennyZhuang db9f296ebe update test 2020-04-24 23:28:49 +08:00
Dan Ryan 61d7223467 fix skip marker
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-23 12:31:51 -04:00
Dan Ryan 1fedb96c5e skip flaky marker test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-23 11:05:53 -04:00
Dan Ryan 73edea10a0 Skip flaky test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-22 17:28:19 -04:00
Dan Ryan 478e4c5f37 add debugging for flaky markers test
- Don't retry vcs installs without pep517 builds

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-21 00:39:40 -04:00
Dan Ryan 8eddee63d8 Fix incorrect marker in test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 18:21:28 -04:00
Dan Ryan 4c68e2092f Don't rely on old requests versions in tests'
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:15:38 -04:00
Dan Ryan c1061bd0a2 Use vistir path normalization for shortened windows paths
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:07 -04:00
Dan Ryan d91a9d4fa6 Normalize paths in test_run_in_virtualenv for windows
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:07 -04:00
Dan Ryan e03878d7c7 Add news entry and fix lockfile
- Drop pytest-tap
- Update azure pipelines config
- Borrow ramdisk configuration from pip
- Fix pyinstaller ref for python 2
- Add 0-minute timeout and add github workflow
- Add skip for pywin32
- Scale down to `-n auto` to reduce race conditions on windows
- Skip pywin32 on python 3.8 as the relevant dependencies aren't
  compatible
- Use default pip exists action = ignore to work around VCS race
  condition
- Create local temp directory to avoid crossing drive letter boundary on
  azure during CI runs
- Monkeypatch click windows console detection to return False in CI

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:06 -04:00
Dan Ryan 00bef5eac7 Fix outline table test to avoid pep517 builder
- Add poetry to test fixtures

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:03 -04:00
Sumana Harihareswara 805f438108 Fix spelling in comment
Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-03-06 15:51:31 -05:00
Sumana Harihareswara 603a20bf45 Update links in documentation
The canonical Pipenv documentation is now at pipenv.pypa.io.
Also, the canonical GitHub repositories for Pipenv and
Requests have changed, and some other communications links
(Twitter, mailing list, "thank you") were no longer
operational. This commit updates those and clarifies that
Pipenv is a project maintained by the PyPA.

Fixes #4137.

Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-03-05 20:55:28 -05:00
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08:00
Frost Ming f9cef97076 Remove tricky test case 2019-08-03 18:17:10 +08:00
Frost Ming 2dc8d0a070 use another version 2019-08-03 16:54:44 +08:00
Frost Ming c3b4c410fa change the version specifier 2019-08-03 11:42:07 +08:00
Frost Ming 7708cd8445 Pass lock options to outdated 2019-08-03 10:44:45 +08:00
John Vandenberg 2f5150ab29 test_install_without_dev: Replace pytz with tablib
pytz exists in the build environment, which will typically
be added to the PYTHONPATH when running the tests in rpmbuild.
The alternative is to create a virtualenv containing only the
pipenv dependencies, which is cumbersome to do when devendoring.
As the pytz library here is not critical to the logic of the
test method, replace it with tablib to reduce unintentionally
errors when packaging.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:02 +07:00
John Vandenberg 9869fcfffa test_update_locks: Replace requests with jdcal
Using requests in tests fails when pipenv is de-vendored.
In this test, using any package with multiple versions
in the local pypi data will suffice to show the functionality
does work, but not with requests, or any devendored package.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:02 +07:00
John Vandenberg e4d992b84c test_uninstall.py: Replace requests with Django 2019-07-11 13:33:01 +07:00
John Vandenberg 050d9b4c78 graph tests: Replace requests with tablib 0.13.0
These tests fail when using requests in a de-vendored installation
because requests is part of the pre-installed image.

tablib has fewer constraints on its dependencies, however its
dependency tree is complicated enough to approximately test
the same functionality, and allows the graph tests to pass
even when de-vendored.
2019-07-11 13:33:01 +07:00
John Vandenberg c79b291cbb Avoid using requests unnecessarily in tests
This replaces requests with tablib in test_include_editable_packages
as in a de-vendored environment the locking fails with requests.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:00 +07:00
Dan Ryan b105ea534b Fix test for formatting paths
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 14:47:39 -04:00
Dan Ryan 1630da82c0 Pin pytest<5
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:36:43 -04:00
Dan Ryan 8abaa06c23 Remove extraneous exception added to conftest.py
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:02:16 -04:00
Dan Ryan e57898ac58 Fix windows test failure and leaky session from xmlrpc call
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 23:51:10 -04:00
Dan Ryan 9c3ee2a72b Get rid of devpi
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:55:47 -04:00
Dan Ryan 5ac676711a Fix editable VCS dependency resolution
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:06:43 -04:00
Dan Ryan 4b75c6490d Fix devpi server to work on windows
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 23:52:49 -04:00