Commit Graph

64 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 9200fe1635 Reenable these tests again on the Windows CI. (#5163)
* reenable these skipped tests on the Windows CI as they appear to be passing again.
2022-07-05 23:55:39 -04:00
Matt Davis 5b3c55d85d Fix install failures that silently pass (#5046)
* Check at the end of install if the failed dependency queue is empty or not and exit with error when there are still failed dependencies.

* Address PR feedback about crayons.

* Fix windows tests that fail because of showing the progress bar, but only local -- CI still breaks. 

* Skip these tests on the windows CI for now.   Created https://github.com/pypa/pipenv/issues/5064 to track
2022-04-20 21:52:53 -04: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 b605989746 fix remaining failng test due to git:// protocol deprecation. 2022-03-16 21:31:10 -04:00
Matt Davis 7e465f358d take 2 2022-03-16 21:09:44 -04:00
Matt Davis ae3bfef534 Attempt at fixing the failing git protocol tests. 2022-03-16 21:04:44 -04:00
Frost Ming eda189aad8 Add a test case to verify the fix 2021-11-18 15:26:30 +08:00
Frost Ming ff32a68771 Remove some usages of vistir.compat 2021-11-08 23:49:40 +08:00
Frost Ming 0f67a112dc Populate the PATH env in pipenv run 2021-11-08 15:02:37 +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 e583f75a74 Change the pipfile format 2020-11-13 10:32:37 +08:00
Frost Ming 0a7235b12e Add test case 2020-11-12 22:06:25 +08:00
Frost Ming 698ef8cdd2 improve test performance 2020-11-02 11:11:57 +08:00
Frost Ming 593a56625c skip specific case on py27 2020-08-12 21:10:07 +08: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 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 1630da82c0 Pin pytest<5
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:36:43 -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 d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan 7d8f517229 Try ditching pip_src_dir in tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-21 22:05:32 -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 9340ddb962 Update tests to rectify issues
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 02:38:02 -05:00
Dan Ryan c049976936 Pass all packages through to venv_resolve_deps
- Use `project.parsed_pipfile` to get all packages instead of a filtered
  subset
- Determine index names via a new `refresh=True` argument to
  `project.get_source()` which clears the current pipfile cache
- Fix parsing of requirement lines from direct URLs which were
  previously excluding the `name@` portion and therefore generating
  invalid links

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-16 12:51:34 -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
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan 1ed7ae9e68 Fix vcs locking, prefer pipfile entries once locked
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-24 19:28:50 -05:00
Dan Ryan a3b5e8f374 Fix local serving of static resource fixtures
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-22 17:05:57 -05:00
Dan Ryan 2a7cc26767 Fix broken tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-22 13:55:50 -05:00
Dan Ryan 9dbe52177f clone a fresh copy of six before running tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-22 13:50:37 -05:00
Dan Ryan 66e9822d8a Potentialy speed up tests, decrease network calls"
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-22 13:32:34 -05:00
Dan Ryan 45e9f6e417 Fix parsing of markers in VCS requirements
- Parsing of markers in non-editable vcs requirements was broken
- This PR adds some VCS repos, some utility pipfile generation functions
  and some fixture helpers
- Fixes #3249

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-18 23:49:57 -05:00
Dan Ryan 3d33e5a257 Update requirementslib and fix VCS installation
Signed-off-by: Dan Ryan <dan@danryan.co>

Don't re-clone repos now that this works

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

Prune peeps directory from manifest

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

Fix nonetype uris

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

Manually lock requirements?

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

Update requirementslib - leave context before updating sha

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

Fix requirementslib vcs checkouts

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

fix tmpdir implementation

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

final fix for vcs uris

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

Allow for adding requirements objects directly to pipfile

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

Update piptools patch

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-09-05 12:47:10 +08:00
Alexandros Tzannes 0081918e63 Skip some tests if we have not set-up SSH keys for GitHub 2018-08-03 16:20:59 -07:00
Alexandros Tzannes 8f1d99256c Skip git+ssh test until we configure BildKite to have an SSH key-pair 2018-08-03 15:21:33 -07:00
Alexandros Tzannes f65c0dfd63 Adding some git+git and git+ssh tests as examples 2018-08-03 15:05:29 -07:00
kennethreitz 7588ca31cf passing tests! 2018-07-03 23:23:20 -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
Dan Ryan 1fd2247bb6 Fix test to account for name resolution of editable deps
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-26 20:10:45 -04:00
Dan Ryan 6343acb4cc Use the real marker parser -- confirmed working
Signed-off-by: Dan Ryan <dan@danryan.co>

Typo fix

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

Move away from structlog for testing

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

Remove em-dash and ellipsis characters

- Replace with dashes and dots

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 7bfa60e90b Add test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-14 03:58:49 -04:00
Dan Ryan a5c876b931 Add ref to vcs install
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-14 03:58:49 -04:00
Dan Ryan 6a0a34b415 Fix uri conversion
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2018-06-13 19:41:15 -04:00
Dan Ryan bca3e1fa61 fix tests
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2018-06-13 19:34:41 -04:00