Commit Graph

3330 Commits

Author SHA1 Message Date
Ilan Schnell 6c4b06295d add yaml test 2020-06-15 15:34:34 +08:00
Ilan Schnell ab5cb8ebe1 add comment 2020-06-15 15:34:34 +08:00
Ilan Schnell 083c241879 add comment 2020-06-15 15:34:34 +08:00
Ilan Schnell 483b5ded21 add comments 2020-06-15 15:34:34 +08:00
Ilan Schnell f9ecbf0b9d add conflicting yaml test 2020-06-15 15:34:34 +08:00
Pradyun Gedam 445711c533
Merge pull request #8349 from uranusjr/new-resolver-reject-unsupported-wheel 2020-06-11 20:03:44 +05:30
Paul Moore bf2b63dd68 Modify tests to check unsupported forms of constraint in the new resolver 2020-06-11 11:41:07 +01:00
Paul Moore 4c055378e5
Merge pull request #8382 from uranusjr/constraint-tests-rewrite
Convert test_install_with_extras_from_install to not use URL constraint
2020-06-11 08:44:47 +01:00
Tzu-ping Chung b0c1308d64 Always Unicode 2020-06-10 20:58:21 +08:00
Tzu-ping Chung f81fd19a7b Ensure entry points are read as UTF-8
Like the wheel metadata, this is, strictly speaking, unspecified. But
UTF-8 is the de-facto standard, and we should support that.
2020-06-10 20:58:20 +08:00
Tzu-ping Chung e7635b7233 Is this a bug or design decision? 2020-06-10 20:57:27 +08:00
Tzu-ping Chung 03c59c50db Make failing tests fail 2020-06-10 20:57:23 +08:00
Paul Moore e97b365529 Mark a few more tests as working under the new resolver 2020-06-10 13:08:37 +01:00
Tzu-ping Chung b372132cac Convert test_install_with_extras_from_install 2020-06-10 12:34:09 +01:00
Paul Moore 57b39a85bc
Merge pull request #8397 from uranusjr/new-resolver-fix-candidate-ordering
New resolver fix candidate ordering
2020-06-10 12:24:37 +01:00
Stéphane Bidoul 0b0a4a5cb5
Merge pull request #8389 from ssurbhi560/add_helper_methods_to_install_user_and_new_resolver_user
Add methods for path lookups in test_install_user.py and test_new_resolver_user.py
2020-06-09 22:24:39 +02:00
Stéphane Bidoul ca439016e5
Merge pull request #8370 from ssurbhi560/add_method_to_new_resolver_and_download
Add methods for path lookups in test_download.py and test_new_resolver.py
2020-06-09 22:23:02 +02:00
Stéphane Bidoul 7abc3038f2
Merge pull request #8379 from gutsytechster/add_helper_test_to_uninstall_user_and_force_reinstall
Add helper methods for path lookups to test_install_force_reinstall.py and test_uninstall_user.py
2020-06-09 22:21:20 +02:00
Stéphane Bidoul 2946038f25
Merge pull request #8366 from gutsytechster/add_helper_method_to_uninstall_and_wheel
Add helper methods for path lookups to test_{uninstall, wheel}.py
2020-06-09 22:20:26 +02:00
Stéphane Bidoul 63cc26792d
Merge pull request #8357 from ssurbhi560/add_helper_methods
Add methods for path lookups in test_install.py and test_install_compat.py
2020-06-09 22:14:30 +02:00
Stéphane Bidoul 774432e52a
Merge pull request #8345 from gutsytechster/add_helper_methods_to_vcs_git_and_wheel
Add methods for path lookups in test_install_{vcs_git, wheel}.py
2020-06-09 22:09:49 +02:00
Stéphane Bidoul 5e69b8c270
Merge pull request #8326 from ssurbhi560/use_methods_in_tests
Add methods for path lookups in test_install_{extras, index}.py
2020-06-09 22:06:13 +02:00
Stéphane Bidoul e349e4269a
Merge pull request #8324 from gutsytechster/update_helper_test
Add methods for path lookups in test_install_{reqs, upgrade}.py
2020-06-09 22:03:24 +02:00
Paul Moore 7bf78f05df
Merge pull request #8283 from uranusjr/pre-existing-build-directory-fix
Pre-existing build directory fix
2020-06-09 16:47:53 +01:00
Stéphane Bidoul 3c6a25c638
Merge pull request #8398 from deveshks/add-flake8-bugbear
Add flake8-bugbear plugin to pre-commit and fix "tests" accordingly
2020-06-05 20:18:23 +02:00
Paul Moore 6b10b1d2a2
Merge pull request #8402 from deveshks/parametrize-tests
Parametrize test_install_package_to_usersite_with_target_must_fail
2020-06-05 16:39:23 +01:00
Paul Moore 71061f3bca
Merge pull request #8321 from uranusjr/new-resolver-passing-tests
Remove new resolver marker from tests that should pass
2020-06-05 11:26:49 +01:00
Devesh Kumar Singh 208282af98 Parametrize test_install_package_to_usersite_with_target_must_fail 2020-06-05 15:07:47 +05:30
Tzu-ping Chung 53ce9b66ac Add failing test for bug found 2020-06-05 08:14:46 +08:00
Devesh Kumar Singh db11f83e2a Fix tests module with flake8-bugbear 2020-06-05 02:41:08 +05:30
Paul Moore d3ce025e8d
Merge pull request #8378 from uranusjr/direct-url-fix
Fix direct URL by always passing the template’s URL values into candidate
2020-06-04 17:31:45 +01:00
Tzu-ping Chung daf454bb3b Mark build dir tests as passing for new resolver
The new resolver uses UUID to allow parallel build directories, so this
error will no longer occur.
2020-06-04 23:26:19 +08:00
Tzu-ping Chung 09a7f271c7 Only attach UUID to build dir for spec candidates
These are the only cases where backtracking can happen. This approach
also accounts for VCS requirements relying on the same ensure function
to do cloning :/
2020-06-04 23:26:19 +08:00
Pradyun Gedam 85ce4dfd2c
Merge pull request #8374 from uranusjr/unsupported-link-with-marker
Correctly apply marker matching logic to all requirements
2020-06-04 11:34:31 +05:30
Tzu-ping Chung 4ca684f3b8 Fix for source directory reuse 2020-06-04 00:32:57 +08:00
Paul Moore 50528a3c0e Test new resolver different behaviour for test_install_editable_with_wrong_egg_name 2020-06-03 14:09:42 +01:00
Surbhi Sharma 85593ab326 use helper methods in test_install_user and test_new_resolver_user 2020-06-03 12:43:49 +05:30
gutsytechster e03f8e8868 refactor(tests): Add helper methods for path lookups
This adds helper methods to test_install_force_reinstall.py
and test_uninstall_user.py
2020-06-02 17:38:55 +05:30
Tzu-ping Chung fe529c140b This should not fail anymore 2020-06-02 20:03:53 +08:00
Tzu-ping Chung 92a687ce66 Make failing test fail 2020-06-02 11:51:39 +08:00
Surbhi Sharma a851753ff0 fix method call 2020-06-01 18:18:33 +05:30
Pradyun Gedam e68b71b8c2
Apply suggestions from code review 2020-05-31 23:04:51 +05:30
Stéphane Bidoul b9a19f6be0
Rename is_direct to user_supplied 2020-05-31 18:33:51 +02:00
Stéphane Bidoul c9a445762c
Mark top level requirements as REQUESTED 2020-05-31 18:33:51 +02:00
Stéphane Bidoul 21df86f197
Add REQUESTED support to install_wheel 2020-05-31 18:33:50 +02:00
Surbhi Sharma fe761c5f4f Use helper methods in test_download and test_new_resolver 2020-05-31 18:55:43 +05:30
gutsytechster 51897fcb63 refactor(test_wheel.py): Add helper methods for path lookups 2020-05-30 23:44:43 +05:30
gutsytechster c4551ac236 refactor(test_uninstall.py): Add helper methods for path lookups 2020-05-30 23:43:48 +05:30
Stéphane Bidoul 7ed5e12ae8
Merge pull request #8336 from deveshks/remove-isinstance-fixme
Remove isinstance FIXME from pip._internal.commands
2020-05-30 10:34:56 +02:00
Surbhi Sharma 381a826760 use methods for path lookups in files:{test_install, test_install_compat} 2020-05-29 13:42:13 +05:30
Sumana Harihareswara cef69fef7f Updated author email in configuration and tests
Per https://groups.google.com/d/msg/pypa-dev/rUNsfIbruHM/LCEx-CB5AgAJ
the pypa-dev Google Group is now decommissioned.
Using distutils-sig instead as author/maintainer email.

Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-05-28 16:51:02 -04:00
Devesh Kumar Singh fe76a1229c Return SUCCESS from FakeCommand.run if run_func isn't provided 2020-05-28 22:31:00 +05:30
Devesh Kumar Singh cbfac1a5d1 import status codes from cli.status_codes 2020-05-28 22:31:00 +05:30
Devesh Kumar Singh f2fb3610f3 Return SUCCESS from side effect function 2020-05-28 22:31:00 +05:30
Pradyun Gedam d49e957905
Skip the correct test 2020-05-28 20:45:56 +05:30
gutsytechster ccee4c784c Refactor test 2020-05-28 16:32:07 +05:30
gutsytechster 41d33cc83c fix(test_install_wheels): Fix flake8 errors 2020-05-28 16:05:17 +05:30
gutsytechster fa280b9370 tests(test_install_{vcs_git, wheel}.py): Refactor path lookups 2020-05-28 15:48:16 +05:30
gutsytechster f39a090441 fix(tests): Only pass readable message as keyword arg to helpers 2020-05-28 15:08:38 +05:30
Tzu-ping Chung 71511afb97 This should pass as well 2020-05-27 23:18:33 +08:00
Tzu-ping Chung 8586098b18 These tests should pass now 2020-05-27 23:18:33 +08:00
Tzu-ping Chung 6c6b6a7765 Implement new Provider.find_matches() 2020-05-27 23:10:56 +08:00
Paul Moore be48ec0d15
Merge pull request #8066 from uranusjr/new-resolver-wheel-cache
Wheel cache link look up in the new resolver
2020-05-27 15:58:10 +01:00
Paul Moore d7fbc9fb16
Merge pull request #8282 from uranusjr/pre-existing-build-directory-reprod
Add reprod for pre-existing build dir failure
2020-05-27 14:01:57 +01:00
Tzu-ping Chung bc9b288b1e Implement wheel cache lookup in the new resolver 2020-05-27 20:19:37 +08:00
Surbhi Sharma 57a0815dd8 use methods for path lookups in files: test_install_{extras, index} 2020-05-27 00:47:00 +05:30
gutsytechster fa06ccf054 tests(test_install_{reqs, upgrade}): add methods for path lookups 2020-05-26 20:13:28 +05:30
Tzu-ping Chung 0e4dd69759 Also fixed this test 2020-05-25 20:39:45 +08:00
Pradyun Gedam 7d875faff9
Merge pull request #8303 from pradyunsg/nicer-test-helpers 2020-05-24 01:58:43 +05:30
Pradyun Gedam c3203aa282
Merge pull request #8292 from deveshks/add-mypy-req-constructors 2020-05-23 17:13:17 +05:30
Pradyun Gedam 2876bf7554
Merge pull request #8141 from deveshks/remove-unused-install-cleanup-tests 2020-05-23 17:12:25 +05:30
Pradyun Gedam d5265e24b7
Merge pull request #8083 from deveshks/warn-on-unexpected-content-type 2020-05-23 17:12:08 +05:30
Pradyun Gedam 403310e9b5
Merge pull request #7996 from deveshks/add-prefer-binary-to-req-file 2020-05-23 17:11:36 +05:30
gutsytechster b82516c9ca fix(_internal/commands): Define a default add_option to child commands 2020-05-23 14:55:37 +05:30
gutsytechster 72a42197a4 refactor(commands): Add method add_options and remove __init__
This removes the __init__ method of child classes and defines
explicit method for adding command options.
2020-05-23 14:50:57 +05:30
Pradyun Gedam f0e2f7f39e
Merge pull request #8299 from uranusjr/remove-test-install-include-work-dir-pkg 2020-05-23 06:25:00 +05:30
Pradyun Gedam 688e488376
Merge pull request #8306 from pfmoore/nr_double_install 2020-05-23 05:34:13 +05:30
Paul Moore c5e2cfc3f7 Give up on trying to be clever 2020-05-22 16:15:24 +01:00
Paul Moore 7fa571e076 Fix test_double_install_fail for new resolver 2020-05-22 16:07:29 +01:00
Paul Moore 48334aeb80 New resolver not raising DistributionNotFound 2020-05-22 15:36:10 +01:00
Paul Moore 16d45b607e Revert "Account for package casing in new resolver"
This reverts commit 52c48a49ab.
2020-05-22 14:10:41 +01:00
Pradyun Gedam 2552151858
Add helpers to TestPipResult 2020-05-22 17:27:44 +05:30
Paul Moore 5b35203bab
Merge pull request #8298 from uranusjr/different-messages
Fix different package casing in tests
2020-05-22 12:00:29 +01:00
Tzu-ping Chung 52c48a49ab Account for package casing in new resolver 2020-05-22 18:22:09 +08:00
Tzu-ping Chung e85a099511 Remove test_install_include_work_dir_pkg 2020-05-22 17:16:43 +08:00
Devesh Kumar Singh ac39efa537 Update parse_editable to return Set[str] 2020-05-22 04:21:14 +05:30
Pradyun Gedam 50c9ea2fe0
This works now! 2020-05-21 21:47:42 +05:30
Paul Moore a14f9aa8ca
Merge pull request #8276 from pfmoore/test_marker
Add a mark for tests that fail on the new resolver
2020-05-21 16:52:33 +01:00
Paul Moore 278ac2d67f
Merge pull request #8286 from uranusjr/read-root-extras-correctly
Always read InstallRequirement.extras
2020-05-21 16:05:35 +01:00
Paul Moore 66f323a53e Fix a marker typo that the new registration of markers picked up :-) 2020-05-21 15:59:25 +01:00
Paul Moore c2fa0dd997 Add a mark for tests that fail on the new resolver 2020-05-21 15:39:00 +01:00
Paul Moore 90168f0b24
Merge pull request #8230 from uranusjr/markers-in-deps
Only include dependencies if the markers match
2020-05-21 15:26:38 +01:00
Devesh Kumar Singh b4d8523b1f Remove tests_install_cleanup tests using static build dir 2020-05-21 19:38:47 +05:30
Devesh Kumar Singh 714a6c5469 Added unit tests 2020-05-21 19:37:45 +05:30
Devesh Kumar Singh 64c78b19b9 Reword warning for invalid content-type 2020-05-21 19:37:03 +05:30
Devesh Kumar Singh fa67244d45 Add unit test to warn on invalid content-type 2020-05-21 19:37:03 +05:30
Tzu-ping Chung 19db59747a Use a temp requirements file to avoid shell syntax 2020-05-21 21:37:19 +08:00
Tzu-ping Chung 4d17d932c5 Add test for picking up non-PEP-508 extrax 2020-05-21 21:01:08 +08:00
Paul Moore 80c640b5a8
Merge pull request #8067 from deveshks/fix-create-basic-wheel-bug
Canonicalise package name in tests.lib.create_basic_wheel_for_package
2020-05-21 13:54:01 +01:00
Tzu-ping Chung a7b643004c Add reprod for pre-existing build dir failure 2020-05-21 17:22:54 +08:00
Tzu-ping Chung 0a4629febb Add test for marker that should fail for now 2020-05-21 15:42:58 +08:00
Tzu-ping Chung 1056681686 Non-ASCII names are not weird 2020-05-19 16:03:51 +08:00
Tzu-ping Chung aef15104c3 Fix test comment 2020-05-19 16:03:51 +08:00
Tzu-ping Chung dc4171c213 Python 2 works but not tested 2020-05-19 16:03:51 +08:00
Tzu-ping Chung 776a55a419 Fix unit tests on module-internal functions 2020-05-19 16:03:51 +08:00
Tzu-ping Chung 2339a7a859 Fix installation of wheel with non-ASCII entries
This mainly deals with correctly recording the wheel content in the
RECORD metadata. This metadata file must be written in UTF-8, but the
actual files need to be installed to the filesystem, the encoding of
which is not (always) UTF-8. So we need to carefully handle file name
encoding/decoding when comparing RECORD entries to the actual file.

The fix here makes sure we always use the correct encoding by adding
strict type hints. The entries in RECORD is decoded/encoded with UTF-8
on the read/write boundaries to make sure we always deal with text
types. A type-hint-only type RecordPath is introduced to make sure this
is enforced (because Python 2 "helpfully" coerces str to unicode with
the wrong encoding).
2020-05-19 16:03:51 +08:00
Pradyun Gedam e7dd02c723
Merge pull request #8027 from gutsytechster/pip/7998 2020-05-19 12:14:59 +05:30
Devesh Kumar Singh 60f00b837a Upgrade flake8 to 3.8.1
Co-Authored-By: Anthony Sottile <asottile@umich.edu>
2020-05-18 21:58:26 +05:30
Paul Moore c74577e18e
Merge pull request #8186 from uranusjr/install-req-from-dist-line-rewrite
Build ireq line from parent for installed dist
2020-05-15 22:33:03 +01:00
Paul Moore e28b388c73
Merge pull request #7997 from uranusjr/resolver-use-user-site
New resolver: implement --user
2020-05-15 20:01:50 +01:00
Paul Moore 66d6601ec9
Merge pull request #8237 from uranusjr/new-resolver-as-a-fixture
Add pytest option to globally switch resolver
2020-05-15 20:00:36 +01:00
Paul Moore d53e880cfe
Merge pull request #8229 from uranusjr/one-constraint-test
Add one more constraint test
2020-05-15 16:37:00 +01:00
Paul Moore 4c599edc5b
Merge pull request #8243 from pfmoore/message_fixes
Fix some test failures related to message differences
2020-05-15 15:25:31 +01:00
gutsytechster 2276f9528c fix(network/auth): Asks for password when it is None
When `get_keyring_auth` provides the password as None, the
user should be prompt to ask password.
2020-05-15 19:41:43 +05:30
Paul Moore adfb70a309
Merge pull request #8239 from pfmoore/constraints_fixes
Tidy up handling of unexpected forms of constraint
2020-05-15 14:58:29 +01:00
Paul Moore 041f83f76a Doh, I forgot to update our own tests... 2020-05-15 14:45:44 +01:00
Paul Moore c258a1f517 Fix some test failures related to message differences 2020-05-15 14:17:47 +01:00
Paul Moore d42c448e7a
Merge pull request #8234 from pfmoore/refactor_find_matches
Split find_matches into generation and sorting
2020-05-15 13:54:50 +01:00
Paul Moore 6fcaf49cb0 Tidy up handling of unexpected forms of constraint 2020-05-14 17:04:18 +01:00
Pradyun Gedam a879bc448a
Merge pull request #8236 from uranusjr/test-skip-reason
Add a reason why we're xfail-ing this test
2020-05-14 17:05:47 +05:30
Pradyun Gedam 9f0665cefe
Merge pull request #8055 from gutsytechster/endian_safe 2020-05-14 17:03:41 +05:30
Paul Moore 9cf1bed78d Address review comments 2020-05-14 11:33:30 +01:00
Tzu-ping Chung a82a5e7abe Add pytest option to globally switch resolver 2020-05-14 18:00:42 +08:00
Tzu-ping Chung 56d53cd60b Add a reason why we're xfail-ing this test
This test uses xfail to test the negation of what's described in the
test, i.e. the assertion should "fail" if the command does what we
expect. I think this is a terrible way to write a test, but don't bother
to rewrite. This commit message is left here to tell future maintainers
what the test is all about by git blame.
2020-05-14 15:15:57 +08:00
Paul Moore ddbc8fd7c1 Split find_matches into generation and sorting 2020-05-13 17:52:09 +01:00
Tzu-ping Chung 713645a554 Add one more constraint test 2020-05-13 07:13:19 +08:00
Pradyun Gedam 0bd624275d
Revert "build in place"
This reverts commit 88e6e6bc5c.
2020-05-13 02:50:10 +05:30
Pradyun Gedam 1b90e1bccf
Revert "remove _copy_source_tree and friends"
This reverts commit 873f1e6332.
2020-05-13 02:50:10 +05:30
Pradyun Gedam c0641464df
Revert "fix test_entrypoints_work test"
This reverts commit ace0c16531.
2020-05-13 02:50:10 +05:30
Pradyun Gedam 4297b8d9b7
Revert "fix test_uninstall_console_scripts"
This reverts commit 877e1ccc77.
2020-05-13 02:50:07 +05:30
Paul Moore 94f2dc435b
Merge pull request #8170 from pfmoore/nr_constraints2
New Resolver: Second try at implementing constraints
2020-05-07 12:40:49 +01:00
Paul Moore 64b3d1b278 Merge constraints into a single SpecifierSet 2020-05-06 11:30:25 +01:00
Paul Moore ee4830b5ec Move constraints from factory to provider 2020-05-06 10:56:50 +01:00
Tzu-ping Chung 6ab42a86b8 Add tests for --user installs
Tests are based on equivalents from test_install_user.py with
modifications to appropriately monkey-patch things in the new resolver
module.
2020-05-06 03:48:34 +08:00
Tzu-ping Chung d8062791dd Implement use-user-site 2020-05-06 03:48:34 +08:00
Tzu-ping Chung 9eb47650b0 Please don't use shell=True :( 2020-05-05 20:29:21 +08:00
Pradyun Gedam 09a5af52e4
Merge pull request #8125 from uranusjr/yanked-link-warning-relocate 2020-05-05 16:15:52 +05:30
Tzu-ping Chung 1f32d8dfc6 Refine output check to accomodate specifier change 2020-05-05 18:42:53 +08:00
Paul Moore 8664218164 Merge branch 'master' into nr_constraints2 2020-05-05 11:41:09 +01:00
Pradyun Gedam cbfbc29b63
Merge pull request #8118 from ilanschnell/yaml_updates 2020-05-04 19:30:50 +05:30
gutsytechster b30dd1e04e fix(tests/unit): Update tests to be endian safe
This updates `test_path_to_display` and `test_str_to_display__encoding`
to use the endian safe expected result instead of the hardcoded one.

This fixes https://github.com/pypa/pip/issues/7921
2020-05-03 22:51:00 +05:30
Paul Moore 1599cc2a36 Merge branch 'master' into nr_upgrade_strategy 2020-05-03 11:01:27 +01:00
Paul Moore 218e7d830d
Merge pull request #8146 from uranusjr/new-resolver-extra-in-explicit-requirement
New resolver: Carry extras info in ExplicitRequirement
2020-05-03 10:57:48 +01:00
Paul Moore d3847e3071
Merge pull request #8059 from pelson/extra_requirements
Add xfail tests for case where specifications added as an extra are not honoured
2020-05-03 10:07:40 +01:00
Paul Moore 2483fb6cdd
Merge pull request #8127 from pradyunsg/resolver/installation-order
Rework `get_installation_order` to allow for dependency cycles
2020-05-03 09:58:59 +01:00
Paul Moore 0058bb5212 Improve test 2020-04-29 14:55:15 +01:00
Paul Moore 5186f05bd7 Add tests for constraints 2020-04-29 12:16:09 +01:00
Devesh Kumar Singh 8dccece9c0 Combine setting new umask and getting old one into one 2020-04-29 11:57:11 +05:30
Devesh Kumar Singh 9319703ad9 Add unit test for checking permissions with custom umask 2020-04-29 11:46:43 +05:30
Ilan Schnell e8920daeab add trivial example to demonstrate installing and uninstalling multiple packages 2020-04-29 00:12:02 -05:00
Ilan Schnell 1f6ff0cc6e make flake8 happy 2020-04-28 23:43:00 -05:00
Ilan Schnell 8b4a4c469a add ability to install list of requirements - with example in simple.yml 2020-04-28 23:32:55 -05:00
Ilan Schnell c14c92d9cd simplify handle_request() - improve error checking 2020-04-28 23:15:57 -05:00
Ilan Schnell 28b0fd353b add allow_error parameter to .run() method 2020-04-28 22:49:18 -05:00
Paul Moore 1eb7011da4 Add an assertion that upgrade_strategy is valid 2020-04-28 10:39:53 +01:00
Pradyun Gedam 22bd8add95
Merge pull request #8095 from hugovk/pip-cache-dir2 2020-04-28 00:57:10 +05:30
Hugo 6b640d1254 Add test for 'pip cache dir 123' with too many arguments 2020-04-27 11:02:18 +03:00
Tzu-ping Chung 06d9ea0952 Mark local install as xfail 2020-04-27 14:36:59 +08:00
Ilan Schnell 87a6bbec39 add backtracking resolver yaml test 2020-04-26 14:09:27 -05:00
Ilan Schnell 850b8c5f53 add information about only single tests to readme 2020-04-26 10:43:52 -05:00
Tzu-ping Chung adef52610e Fix assertion 2020-04-26 18:22:21 +08:00
Tzu-ping Chung 9af0b3daeb Use oct for better error message 2020-04-26 18:17:33 +08:00
Tzu-ping Chung 388ca923ef Add persumably failing permission check 2020-04-26 18:14:38 +08:00
Tzu-ping Chung 0104adb037 Add failing test for explicit requirement extras 2020-04-26 16:39:31 +08:00
Ilan Schnell 6529780461 move import so isort does not try to "fix" import order 2020-04-26 00:51:12 -05:00
Ilan Schnell a9930dbd19 add checking for requested package dict 2020-04-25 23:10:43 -05:00
Ilan Schnell b837b37074 update link to refer directly to benoit-pierre's comment 2020-04-25 20:00:44 -05:00
Ilan Schnell 9c9ae3dc8b update description - make flake8 happy 2020-04-25 18:26:40 -05:00
Ilan Schnell 1b22ef6666 simplify code, ensure state is a list 2020-04-25 18:17:18 -05:00
Ilan Schnell bb9a2bdc4b add yaml linter and update readme 2020-04-25 14:48:29 -05:00
Ilan Schnell 051c394944 typo 2020-04-25 00:27:28 -05:00
Ilan Schnell 17103e8d1a add new test example mentioned in issue #988 2020-04-25 00:07:57 -05:00
Ilan Schnell f8fa3f8c4f add comment 2020-04-24 23:11:35 -05:00
Ilan Schnell da99c14790 add test contructed from blog post, see notes within file 2020-04-24 23:09:42 -05:00
Pradyun Gedam ea52559cf8
Add tests for get_topological_weights 2020-04-25 04:09:28 +05:30
Pradyun Gedam 9ae99b6d2b
Factor out test logic for graph generation 2020-04-25 04:09:28 +05:30
Pradyun Gedam ebc0e33378
Amend tests, by fixing typos 2020-04-25 04:09:28 +05:30
Tzu-ping Chung 367e6617bd Move yanked message unit tests to use resolver 2020-04-25 03:53:53 +08:00
Tzu-ping Chung f35f37ef72 Add find_requirement() wrapper in legacy resolver 2020-04-25 02:28:43 +08:00
Paul Moore 04bf571521 Ensure root requirement name is canonicalised 2020-04-24 14:30:34 +01:00
Paul Moore df3b440f7b Fix the factory fixture to supply the new upgrade_strategy argument 2020-04-24 12:03:29 +01:00
Noah Gorny 8c28b8173a tests: commands: cache: Add no-cache-dir test case 2020-04-24 13:08:59 +03:00
Paul Moore d605530b44 Implement upgrade strategies for the new resolver 2020-04-24 11:08:06 +01:00
Ilan Schnell 08aecfb41c add test for https://github.com/python-poetry/poetry/issues/2298 2020-04-23 22:40:53 -05:00
Ilan Schnell 3ba506fd53 update work on yaml readme 2020-04-22 23:05:51 -05:00
Ilan Schnell 8780a80c4d make flake8 happy 2020-04-22 18:23:24 -05:00
Ilan Schnell 1d1b7a674e simplify assertion for valid skip values 2020-04-22 17:57:20 -05:00
Ilan Schnell 05babbcb68 improve test name 2020-04-22 17:50:01 -05:00
Ilan Schnell 5af919c475 yaml test extras-2 passws with new resolver 2020-04-22 17:45:08 -05:00
Ilan Schnell 9ef15bc012 run tests with old and new resolver, and add ability to skip for either 2020-04-22 17:33:12 -05:00
Ilan Schnell 769ac3e59e Merge branch 'master' into test_skip 2020-04-22 15:27:08 -05:00
Ilan Schnell 07845f8c97 move yaml test files up one level 2020-04-22 15:23:35 -05:00
Ilan Schnell 2daedca9c4 add new_resolver option to handle_request() 2020-04-22 15:20:59 -05:00
Pradyun Gedam 5e4c3565e4
Update tests, didn't directly reference "regex" 2020-04-20 22:58:10 +05:30
Pradyun Gedam 7e61569b1a
Drop --skip-requirements-regex 2020-04-20 22:37:25 +05:30
Hugo cebac6aa6c Add 'pip cache dir' command to show the path to pip's cache directory 2020-04-20 11:48:36 +03:00
Tzu-ping Chung 4fb7687fa7 Add failing tests 2020-04-18 22:47:44 +08:00
Pradyun Gedam 97f639057e
Merge pull request #8014 from uranusjr/always-return-installed-candidate 2020-04-18 16:15:14 +05:30
Devesh Kumar Singh 22878a827b Added unit tests to verify correct normalization of package name 2020-04-18 11:03:56 +05:30
Devesh Kumar Singh 7bcccbd3dc Canonicalise package name in tests.lib.create_basic_wheel_for_package 2020-04-17 01:21:51 +05:30
Phil Elson bdc886be40 Add xfail tests for case where specifications added as an extra are not honoured. 2020-04-16 05:17:01 +02:00
Paul Moore 2f3a1be118
Merge pull request #8033 from pfmoore/messages
Make message more user friendly when unable to resolve
2020-04-15 19:43:53 +01:00
Paul Moore 8c118c8f3a Fix the test to check for canonical name 2020-04-14 15:18:24 +01:00
Paul Moore ea391b2aab Merge with master 2020-04-14 11:27:10 +01:00
Pradyun Gedam 78f16daa27
Switch pip's use of pytoml -> toml 2020-04-14 13:07:17 +05:30
Pradyun Gedam 471bc0e2c3
Merge pull request #7962 from CrafterKolyan/patch-1
Speed up `pip list --outdated`
2020-04-14 02:28:28 +05:30
Pradyun Gedam 3c1cf3e139
Merge pull request #7885 from NoahGorny/cache-trusted-host
Cache trusted host
2020-04-14 02:26:28 +05:30
Pradyun Gedam f458573de6
Merge pull request #7882 from sbidoul/build-in-place-7555-sbi
Build local directories in place
2020-04-13 21:33:02 +05:30
Pradyun Gedam bdff935570
Merge pull request #6391 from duckinator/pip-cache
Add 'pip cache' command
2020-04-13 19:53:05 +05:30
Pradyun Gedam 92c9f8136a
Merge pull request #8004 from uranusjr/requires-python-error
New Resolver: Raise UnsupportedPythonVersion for Requires-Python mismatch
2020-04-13 19:42:51 +05:30
Pradyun Gedam 15f8a35e4b
Merge pull request #7887 from NoahGorny/pip-debug-print-vendored-versions
pip debug: Add versions of vendored libraries to output
2020-04-13 19:29:27 +05:30
Paul Moore 3642589903 Make message more user friendly when unable to resolve 2020-04-13 11:32:21 +01:00
Pradyun Gedam fc24a17899
Merge pull request #8022 from sbidoul/simplify-install-req-source-dir-sbi
Remove InstallRequirement source_dir parameter
2020-04-13 05:00:06 +05:30
Stéphane Bidoul 877e1ccc77
fix test_uninstall_console_scripts
This particular test checks which files are
created. Since we now build in place, expect the .egg-info directory to be created.
2020-04-12 12:00:58 +02:00
Stéphane Bidoul ace0c16531
fix test_entrypoints_work test
Since we now build in place, pip install
calls setup.py in place which in turn creates
fake_pkg.egg-info. Since in this test the package we are installing is in script.temp_path,
we must tell script to expect temporary
files to be created.
2020-04-12 12:00:57 +02:00
Stéphane Bidoul 873f1e6332
remove _copy_source_tree and friends 2020-04-12 12:00:57 +02:00
Stéphane Bidoul 88e6e6bc5c
build in place 2020-04-12 12:00:57 +02:00
Stéphane Bidoul 076d1a8ed8
Fix tests that build fake InstallRequirements with source_dir 2020-04-12 11:39:09 +02:00
Noah Gorny bfd17cbd97 tests: functional: Add new test_debug vendored version test 2020-04-11 01:54:57 +03:00
Noah Gorny 4efd8af14b tests: functional: Add new cases to the simple test_debug 2020-04-11 01:54:57 +03:00
Pradyun Gedam 5c9e83a3aa
Merge pull request #8012 from deveshks/fix-comments-in-test-install
Fix incorrect comment in tests in test_install
2020-04-10 21:36:28 +05:30
Tzu-ping Chung d2028e9538 Implement RequiresPythonRequirement with context
This specialized class is able to carry more context information than
the previous implementation (which reuses ExplicitRequirement). Error
reports can thus provide better messages by introspecting.
2020-04-10 23:17:29 +08:00
Devesh Kumar Singh 528a193dda Fix incorrect comment in tests 2020-04-10 19:02:57 +05:30
Pradyun Gedam 81f1054865
Merge pull request #7873 from hroncok/no_copy_self
Prevent infinite recursion with pip wheel with $TMPDIR in $PWD
2020-04-10 18:56:31 +05:30
Tzu-ping Chung cfac6aebdd Always return an install candidate last if matches
This rewrites how a SpecifierRequirement generates candidates, so it

* Always return an AlreadyInstalledCandidate (as long as the version
  satisfies the specifier), even if PackageFinder does not return a
  candidate for the same version.
* Always put the AlreadyInstalledCandidate last, so it's preferred over
  LinkCandidate, preventing version changes if possible.
2020-04-10 20:51:06 +08:00
Pradyun Gedam 9360793a6c
Merge pull request #7987 from deveshks/add-tests-for-pip-cmds-ignoring-cwd
Add unit tests for pip commands not using cwd
2020-04-10 14:29:06 +05:30
Paul Moore c7bde5bf88
Merge pull request #7990 from uranusjr/resolver-installed-2
New Resolver: Correctly uninstall existing distribution before installing
2020-04-09 20:58:17 +01:00
Nikolay Korolev 3acf8b7e4b
Merge branch 'master' into patch-1 2020-04-09 15:48:56 +03:00
Pradyun Gedam ea1295b720
Merge pull request #7965 from deveshks/warn-on-invalid-index-url
Warn if an invalid URL is passed with --index-url
2020-04-09 17:15:47 +05:30
Xavier Fernandez ea9cb06c49
Merge pull request #7988 from McSinyx/tabulate
Fix tabulate col size in case of empty cell
2020-04-09 13:35:16 +02:00
Pradyun Gedam c110953703
Merge pull request #7958 from ilanschnell/add-yaml-options
Add ability to run pip with options for yaml tests
2020-04-09 10:20:37 +05:30
Tzu-ping Chung be60eaaa4f Uninstall existing dist before reinstallation 2020-04-08 17:17:25 +08:00
Tzu-ping Chung e714b5cf84 Add failing tests for reinstall and upgrade 2020-04-08 17:16:47 +08:00
Devesh Kumar Singh fe6920bc2f Addressed review comments 2020-04-08 13:59:33 +05:30
Danny McClanahan 6e7b16cec4
add failing test ; apply the fix ; add template NEWS entry
add failing test

apply the fix

add template NEWS entry according to https://pip.pypa.io/en/latest/development/contributing/#news-entries (wrong PR #)

rename news entry to the current PR #

respond to review comments

fix test failures

fix tests by adding uuid salt in urls

cache html page fetching by link

make CI pass (?)

make the types much better

finally listen to the maintainer and cache parse_links() by url :)

avoid caching parse_links() when the url is an index url

cleanup

add testing for uncachable marking

only conditionally vendor _lru_cache for py2

bugfix => feature

python 2 does not cache!

Do away with type: ignore with getattr()

respond to review comments
2020-04-07 12:01:43 -07:00
Nguyễn Gia Phong 26b76f6f11 Move tabulate to utils.misc and test it 2020-04-07 17:35:47 +07:00
Devesh Kumar Singh efd6dd28d0 Address review comments 2020-04-07 09:44:36 +05:30
Devesh Kumar Singh a73ad91c8b Running test_check for pkg_path 2020-04-07 09:06:13 +05:30
Devesh Kumar Singh ac65f136fd Add tests to verify --index-url behaviour 2020-04-06 20:19:11 +05:30
Devesh Kumar Singh 84baf2110f Fixed issue in test_freeze for failing test 2020-04-06 01:26:33 +05:30
Devesh Kumar Singh 29b4ec79ed Fixed issue in test_show for failing test 2020-04-06 00:27:30 +05:30
Devesh Kumar Singh 2324ae422e Add unit tests for pip commands not using cwd 2020-04-05 23:17:03 +05:30
Pradyun Gedam eb865b4e10
Merge pull request #7955 from deveshks/pip-list-not-contain-pkg-work-dir
Don't list packages in current directory
2020-04-05 21:13:14 +05:30
Devesh Kumar Singh feac595446 Don't use cwd in python -m pip command 2020-04-05 19:59:05 +05:30
Ilan Schnell 2b883d5d8a add ability to test uninstall - and simple uninstall test 2020-04-05 00:05:43 -05:00
Ilan Schnell 0c3bc448e1 always check for files in site-packages - add simple test for installing twice 2020-04-04 14:33:28 -05:00
Nikolay Korolev e454181ba6 Fix coding style 2020-04-04 22:30:57 +03:00
Nikolay Korolev f8bb362fef Fix Python 2 compatibility in tests 2020-04-04 22:26:03 +03:00
Nikolay Korolev 3bc3cee5ae Add logging thread-safety tests 2020-04-04 22:18:12 +03:00
Ilan Schnell a0fe4112d1 better naming in yaml-files: transaction -> response, install -> state 2020-04-04 14:00:16 -05:00