Commit Graph

31 Commits

Author SHA1 Message Date
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
Oz N Tiram ca38db63db Use temp_environ in test for CUSTOM_VENV_NAME
This is so that PIPENV_CUSTOM_VENV_NAME does not leak to
other tests.
2022-08-04 10:56:48 +02:00
otherjake ec38ae1e81 Add unit test, create a section about venv names
in advanced docs.
2022-08-04 10:56:48 +02:00
Matt Davis 2b895ffb3f Support the NO_COLOR and deprecate PIPENV_COLORBLIND environment variables (#5185)
* Refactor to support the NO_COLOR argument and deprecate PIPENV_COLORBIND variable.

* Add news fragment.
2022-07-24 09:04:28 +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
Frost Ming ff32a68771 Remove some usages of vistir.compat 2021-11-08 23:49:40 +08:00
kobayashi f26c9b5235 behave as no .venv if .venv is in project root and empty 2021-10-03 01:03:04 -04:00
Frost Ming 6ef9344a5f Avoid wait() on processes 2021-07-29 14:42:52 +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
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08: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
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan b0085bbd97 configure cert bundle
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-08-22 02:50:58 -04:00
Dan Ryan e934ccc73c Minor adjustments to get CI passing
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-08-22 02:24:51 -04:00
MarkKoz 86f9f4fccc add test for venv file with a relative path 2018-08-06 12:36:40 -07:00
MarkKoz e4a845fb31 update docstrings for tests 2018-08-06 12:32:54 -07:00
MarkKoz 1fa14eaffd add missing decorator for test_venv_file_with_name 2018-08-06 12:31:58 -07:00
MarkKoz 4844a0b7a1 remove requests package install in tests
We're only interested in testing if the virtual environment can be
successfully created.
2018-08-06 12:31:38 -07:00
MarkKoz 93d158b556 simplify venv location retrieval in tests 2018-08-06 12:30:42 -07:00
MarkKoz bab6429bd9 switch test_venv_file_exists back to test_venv_file_with_name 2018-08-06 12:29:34 -07:00
Dan Ryan 610f83bb76 fix inclusion of project name in wrong test 2018-08-04 20:13:20 -04:00
Dan Ryan fed71c78cf Remove old test line 2018-08-04 19:33:26 -04:00
Dan Ryan d2d5aa6bd4 Merge branch 'master' into master 2018-08-04 18:34:21 -04:00
MarkKoz 96fec11b29 Fix virtualenv creation failure when a .venv file exists 2018-08-02 21:56:41 -07:00
MarkKoz 42de3d15ed Properly handle pre-existing .venv files 2018-08-02 21:01:34 -07:00
Tzu-ping Chung a5a9583c2d Un-vendor Pew 2018-07-05 16:43:11 +08:00
Tzu-ping Chung 4533e68bca Move things around 2018-04-12 17:35:17 +08:00