Commit Graph

78 Commits

Author SHA1 Message Date
Matt Davis 19b53014f4 Merge branch 'main' into named-categories 2022-10-05 23:30:54 -04:00
jerempy 3171333449 delete accidental dup test 2022-10-05 10:54:46 -04:00
jerempy 5bf9f1baac pipfile saves correctly
and news segment
2022-10-05 10:52:09 -04:00
jerempy 3fe3674949 test first - it fails
expected output doesn't match current output which is "python_version": "3.10"
2022-10-03 09:10:56 -04:00
Oz N Tiram 21b6eb732d Yank skipped test - pipenv no longer supports unnamed index 2022-09-15 14:53:16 +02:00
Oz N Tiram db743ea011 Disable test that break with plette
Unnamed sources will break with the following error:

pipenv.vendor.plette.models.base.ValidationError: {'url': 'https://pypi.org/simple', 'verify_ssl': True}
name: required field
2022-09-13 16:20:06 +02:00
Matt Davis 24c51eb3a2 Resolve environment variables expanding for the sources. 2022-09-11 10:16:52 -04:00
Matt Davis 0c8d4c371a Fix the tests. 2022-09-11 09:37:49 -04:00
Matt Davis f46212e0fe More test optimizations. 2022-09-07 16:21:35 +02:00
Matt Davis bcaae97caa More test optimizations. 2022-09-06 00:46:46 -04:00
Matt Davis 9848862927 Convert test runner to use pypiserver package as standalone process (#5284)
* Check point progress on moving tests to pypiserver.

* Allow other indexes to mimic the pypi json API for package hashes.

* Fix these tests that run on lower python versions only.

* Try adding the pypiserver to the github actions to only run once.

* Expand the scope of fixtures for pypiserver.

* try to accomedate microsoft runner.

* Windows networking troubles.

* Remove running as a background job.

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to condtionally invoke different start pypi-server commands

* Try to introduce pypi as the root index because setuptools-scm is not in our pypi artifacts.

* see if the windows tests run faster (and the other tests) by supplying waitress.

* Only use waitress on windows because the others are fast on the default.  Fix requests pollution.

* Supply a suitable Pipfile instead for these two failing tests.

* More requests resolver cross test contamination cleanup.

* remove problematic tests because even on my version of python 3.8.12 this does not work due to AttributeError: 'HTMLParser' object has no attribute 'unescape'

* fix mirror install test.

* Fix Pipfile.

* Fix Pipfile for real

* Fix tests

* Cleanup test naming and more test enhancements.

* Save this optimization for a subsequent PR.

* Cleanup the TemporaryDirectory between tests.

* resolve merge conflict.

* Cleanup path initalization -- it hsould always be a TemporaryDirectory for tests that gets cleanedup.

* Cleanup path initalization -- it hsould always be a TemporaryDirectory for tests that gets cleanedup.

* tableflip on those requests tests that read the setup metadata in reqlib from other tests.

* Update developer documentation for running tests.

* add news fragment.

* Try gunicorn perfoormance for linux/mac

* Only use gunicorn on linux based on the results of last run.
2022-09-05 10:19:12 -04:00
Matt Davis 7b9b1aeb1c Allow users to pass a string of extra arguments to pip (#5283)
* Allow users to pass a string of extra arguments to pip install
2022-09-04 16:20:59 -04:00
Matt Davis 7d80a7fea5 Use a different library since I could not figure out the six conflicts this caused with other tests. 2022-09-04 00:28:02 +02:00
Matt Davis d59ded7de5 Add test case that fails on main branch and covers example fix of the issue. 2022-09-04 00:28:02 +02:00
Matt Davis 0caed6906f Reduce the amount of calls to pip and the number of tempfiles in batch_install. (#5301)
* Reduce the amount of calls to pip and the number of temp files in batch_install.

* Add logic to read the progress of the install in realtime from pip and stop using progress bar.

* refactor based on PR feedback.
2022-08-31 19:51:29 -04:00
Matt Davis e44d797ae1 Add unit test for this. 2022-08-13 21:19:19 +02:00
Dương Quốc Khánh e9dc3247dc Issue 4371 incorrect dependencies when install dev packages (#5234)
* Add test, ensure dev lock use default packages as constraints.

* Use default packages as constraints when locking develop packages.

* Add test, ensure installing dev-packages use default packages as constraints. (#4371) (#2987)

* Use default packages as constraints when installing provided dev packages.

* change vistir.path.normalize_path to pipenv.utils.shell.normalize_path

* Add function that get contraints from packages.

* Add test for get_constraints_from_deps function

* Use get_constraints_from_deps to get constraints

* Use @cached_property instead of @property

* Use standalone utility to write constraints file

* prepare_constraint_file use precomputed constraints.

* Add news fragment.
2022-08-13 05:17:09 -04:00
Matt Davis 771cee564a Remove tests that are old and permenently skipped, remove OS skips that seem to not make sense. 2022-07-29 15:28:18 +02:00
Matt Davis 949ee95d67 More granular control over PIPENV_VENV_IN_PROJECT variable. (#5026)
* Allow PIPENV_VENV_IN_PROJECT to be read in as None, and ensure if it is set to False that it does not use .venv directory.

* refactor based on PR feedback and add news fragment.

* Review unit test coverage and add new tests.  Remove unneccesary bits from other tests.
2022-04-06 21:10:05 +02:00
Matt Davis 3387881a6d Code reorg utils into utils module reduces complexity (#4990)
* Split apart the massive utils.py into a utils module
2022-03-29 20:27:33 -04:00
Matt Davis b60fa7f5e6 Fix the assumption that all sources are named. (#5004)
* Fix the assumption that all sources are named.

* Add test case

* Add news fragment
2022-03-23 14:04:13 +01:00
Frost Ming 3d678257b7 Fix the index parsing 2021-12-23 10:49:17 +08:00
Frost Ming ff32a68771 Remove some usages of vistir.compat 2021-11-08 23:49:40 +08:00
Frost Ming 9b4eb98529 Remove unused patch files 2021-07-28 17:30:17 +08:00
Frost Ming a82bbb7b27 Try switching from delegator to subprocess 2021-07-28 16:39:36 +08:00
Frost Ming ca5d931f1f Update to py36 plus syntax 2021-07-28 10:59:00 +08:00
Frost Ming dcd06330e4 Update pythonfinder to 1.2.8 2021-07-27 15:11:29 +08:00
Frost Ming 7fc8fc8398 Create news entry 2020-09-01 14:09:39 +08: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
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 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
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
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 83868c8f1a Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the
  spinner is running (i.e. during locking)
- This PR also cuts over to Devpi for a backing cache rather than a
  hacked httpbin instance
- Inclues a refactor of `pip_install` to deduplicate logic
- Attempts to switch back to relying on native editable installs in pip
  as the current implementation is broken on master (i.e. nothing is
  installed in the virtualenv)
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 01:26:49 -04:00
Dan Ryan 359906c669 Update tests to resolve some transient resolution issues
Signed-off-by: Dan Ryan <dan@danryan.co>

probably need to sync submodules for this to work

Signed-off-by: Dan Ryan <dan@danryan.co>

Update to new version of artifacts

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix windows failure

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure-pipelines.yml for Azure Pipelines

Update lockfile test for windows

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix scandir test

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure test steps

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python discovery when nothing is supplied

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix cli ensure_project call

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix run in virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Show why virtualenv test failed if it did

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python interpreter discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

scale down lock test modifications and increase error logging

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix spinner bugs on windows and python discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix pythonfinder search algorithm to dodge false paths on win

Signed-off-by: Dan Ryan <dan@danryan.co>

use pipenv directly

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:01:07 -04:00
Dan Ryan d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan 116d0857a2 Fix variable references
Signed-off-by: Dan Ryan <dan@danryan.co>

Fix variable references

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix variable references

Signed-off-by: Dan Ryan <dan@danryan.co>

Switch to powershell for windows virtualenv creation

Signed-off-by: Dan Ryan <dan@danryan.co>

use python version as path

Signed-off-by: Dan Ryan <dan@danryan.co>

use python version as path

Signed-off-by: Dan Ryan <dan@danryan.co>

swap variable name for python exe

Signed-off-by: Dan Ryan <dan@danryan.co>

add fallback for python exe

Signed-off-by: Dan Ryan <dan@danryan.co>

fix python variable setting

Signed-off-by: Dan Ryan <dan@danryan.co>

fix python variable setting

Signed-off-by: Dan Ryan <dan@danryan.co>

Use variable susbstitution for python executable location

Signed-off-by: Dan Ryan <dan@danryan.co>

Use activate script properly

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix floating quote in python version

Signed-off-by: Dan Ryan <dan@danryan.co>

Don't block on safety call in python 2 as it overwrites output for some reason

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

Don't block on pipenv graph either

Signed-off-by: Dan Ryan <dan@danryan.co>

Check command return code instead of calling `block`

Signed-off-by: Dan Ryan <dan@danryan.co>

Don't load json after its already loaded

Signed-off-by: Dan Ryan <dan@danryan.co>

Wait on return code before checking contents

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:11:05 -04:00
Dan Ryan a47a26b87a Fix failing tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 11:51:15 -05:00
Dan Ryan f5fda09b9d Direct URL updates and pep517 fixes
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-14 22:44:51 -05:00
Dan Ryan 19f2ee61e9 Update resolver to handle all resolution in venv
- Resolve all VCS and non-piptools-resolveable deps in venv
- Implement pep517 for resolution of non-setuptools builds
- Add full support for the new dependency link format
- Fix breakages from pip 19* rollout and subsequent setuptools breakage

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-02-11 00:48:35 -05:00
Frost Ming aadb24b9df Move to install test suite 2018-12-07 09:00:04 +08:00
Dan Ryan 2160b64005 Merge branch 'master' into bugfix/3324 2018-12-01 14:09:59 -05:00
Dan Ryan a500420f6c Merge branch 'master' into resort-imports 2018-12-01 13:06:25 -05:00