Commit Graph

33 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
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
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
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 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
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
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 d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan b0ba9a8766 Update syntax for context manager virtualenv test class
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 14:23:18 -05:00
Dan Ryan 090619a6a1 Fix virtualenv tempdir lifespan
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 13:11:32 -05:00
Dan Ryan 3bc48f034f Fix venv with leading dash test on windows and clean up tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-21 22:18:00 -05:00
Dan Ryan bfdb9aed87 Fix installed package discovery
- Exclude python when searching virtualenvs created using nested
  virtualenv interpreters (via `lib-dynload` library directory)

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-19 20:29:26 -05:00
Dan Ryan 5ac228e68f Fix test errors and local install for azure
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-19 09:34:48 -05:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan 14a0766791 Update test to patch new mkdtemp target
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-23 02:15:50 -05:00
Tzu-ping Chung a5a9583c2d Un-vendor Pew 2018-07-05 16:43:11 +08:00
Dan Ryan c6fba403fe Merge branch 'master' into appveyor_update 2018-06-29 04:37:59 -04:00
Dan Ryan 52095a9284 Stop importing unused things
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-28 22:01:10 -04:00
Dan Ryan 36e28c0370 Merge branch 'master' into feature/repatch-shell-detection 2018-06-28 20:50:18 -04:00
Dan Ryan 29766fa0ce Fix test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-28 18:14:18 -04:00
Dan Ryan 39a363b780 Update references to Path
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-27 22:28:31 -04:00
Tzu-ping Chung 198e618ebc Implement our own subshell logic
To replace Pew's "workon" command. New code built on Shellingham.

This also fixes a few additional minor bugs, e.g. Cmder not launching
Powershell when it should.
2018-06-26 17:12:13 +08:00
dnoetzel 0a5d83b2bd Merge branch 'master' into bugfix-439 2018-06-25 15:16:56 -05:00
David Noetzel 4b4b384fe0 Add failing test 2018-06-25 14:39:50 -05:00
Dan Ryan dca353ffdb add test for #2192
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-23 19:18:18 -04:00
Dan Ryan efe39654bb Update integration test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-22 15:36:39 -04:00
Dan Ryan c31a311dc7 Minor code cleanup
Signed-off-by: Dan Ryan <dan@danryan.co>

Add pytz and certifi updates

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

Fix nondeterministic resolution bug

- Update dependencies
- Fix some issues with test logic
- Update piptools patch

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

Update more packages

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

Update tests and utils

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

Still need to tackle last few failures

- this will seriously help with resolution issues

Add alembic new version

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-22 15:36:39 -04:00
Dan Ryan 1c04960653 Add test to verify pipenv update
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-18 11:28:17 -04:00
Tzu-ping Chung 4533e68bca Move things around 2018-04-12 17:35:17 +08:00