Commit Graph

3286 Commits

Author SHA1 Message Date
Nguyễn Gia Phong 25a25a0975 Test network.lazy_wheel.dist_from_wheel_url 2020-06-26 15:15:28 +07:00
Devesh Kumar Singh 4ecd7ecbc7 Assert result string in test_prompt_for_authentication 2020-06-26 07:22:21 +05:30
Devesh Kumar Singh 6119a837ea Add unit tests for --no-input flag 2020-06-26 07:21:45 +05:30
Nguyễn Gia Phong 0a3b20f9b8 Drop parallel map for Python 2 and the non-lazy variant
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-25 21:10:49 +07:00
Nguyễn Gia Phong 13539d00f8 Wrap lazy map as well 2020-06-25 21:10:49 +07:00
Nguyễn Gia Phong e7f637e5ca Add tests for utils.parallel 2020-06-25 21:10:49 +07:00
Paul Moore 3dad80a314 Lint fix 2020-06-25 13:00:11 +01:00
Paul Moore cdc4e40dad Test is checking the old resolver's broken behaviour 2020-06-25 13:00:11 +01:00
Devesh Kumar Singh bd70025c98 Remove --always-unzip based tests 2020-06-25 16:52:15 +05:30
Tzu-ping Chung ec1f3cc189 Fix YAML tests to reflect the new resolver error 2020-06-25 15:00:21 +08:00
Pradyun Gedam 8c3447e85e
Merge pull request #8440 from uranusjr/yaml-tests 2020-06-24 18:38:59 +05:30
Pradyun Gedam fb68794188
Merge pull request #8026 from sbidoul/requested-sbi 2020-06-24 18:24:30 +05:30
Paul Moore b966e1383b
Merge pull request #8482 from uranusjr/new-resolver-union-with-versions
Mark new resolver test failure on extra union
2020-06-24 13:20:13 +01:00
Tzu-ping Chung 95477931b2 Mark new resolver test failure on extra union 2020-06-23 20:45:41 +08:00
Tzu-ping Chung da23209fbe Expect deprecation warning for build_dir in tests 2020-06-23 20:18:42 +08:00
Stéphane Bidoul acab2ee54e Deprecate --build-dir 2020-06-21 19:05:55 +02:00
Paul Moore 3a3d1d5afe
Merge pull request #8468 from pfmoore/nr_test_messages
Test message check fixes
2020-06-19 11:01:17 +01:00
Paul Moore a7e3f8d088 Test message check fixes 2020-06-18 18:05:51 +01:00
Paul Moore 9626dacec5 Some tests need to monkeypatch the new resolver internals 2020-06-18 15:49:18 +01:00
Paul Moore d287033599
Merge pull request #8394 from pfmoore/nr_conflict_message
Improve the message for "Resolution Conflict" errors
2020-06-18 13:45:51 +01:00
Tzu-ping Chung fd3a785018
Reduce regex use when not necessary
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-18 17:15:58 +08:00
Paul Moore 2795742b31 Add handling of inconsistent root requirements 2020-06-17 16:47:04 +01:00
Paul Moore 09d311594e Move error handling to factory.get_installation_error() 2020-06-17 16:44:53 +01:00
Jussi Kukkonen dd42e7ec25 test server: Don't mask invalid signals on py38
This removes warnings from test output in python 3.8:

  /usr/lib/python3.8/signal.py:60: RuntimeWarning:
  invalid signal number 32, please use valid_signals()
2020-06-16 17:58:44 +03:00
Tzu-ping Chung 5ee2eeda21 Make the failing tests fail 2020-06-15 16:38:10 +08:00
Tzu-ping Chung 9a2527ad09 Rename CFFI for PyPy 2020-06-15 15:47:38 +08:00
Ilan Schnell 0462774be1 add comment about skiping error checking test on Windows 2020-06-15 15:34:37 +08:00
Ilan Schnell 4b6ce4fbe4 add restore re.I flag 2020-06-15 15:34:37 +08:00
Ilan Schnell 2198e2b2ab Update tests/yaml/conflicting_triangle.yml
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell 599a494945 Update tests/yaml/conflicting_diamond.yml
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell f6691c0aca Update tests/yaml/conflict_2.yml
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell 6e07c0fd82 Update tests/functional/test_yaml.py
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-06-15 15:34:37 +08:00
Ilan Schnell bf3b1859fc add ability to match error messages against regular expressions 2020-06-15 15:34:37 +08:00
Ilan Schnell e1f007b314 check for stderr regex in linter 2020-06-15 15:34:37 +08:00
Ilan Schnell f11c6d6cbd on Windows, the errors behave differently 2020-06-15 15:34:36 +08:00
Ilan Schnell 13ce5209b4 add error checks - run circular tests with new resolver 2020-06-15 15:34:36 +08:00
Ilan Schnell fec4a0dabd update yaml linter 2020-06-15 15:34:36 +08:00
Ilan Schnell 54f350d524 add error checking to yaml test files 2020-06-15 15:34:36 +08:00
Ilan Schnell 982fddf9c0 add checking exit code and stderr message 2020-06-15 15:34:36 +08:00
Ilan Schnell a45f657f97 add test for double install 2020-06-15 15:34:36 +08:00
Ilan Schnell 2e086eca40 add test case 2020-06-15 15:34:36 +08:00
Ilan Schnell 7dc345386a add huge yaml test (579 packages) going to add more test cases 2020-06-15 15:34:35 +08:00
Ilan Schnell 4d17ec6442 add errors draft 2020-06-15 15:34:35 +08:00
Ilan Schnell 708b675ba7 add test for unavailable version 2020-06-15 15:34:35 +08:00
Ilan Schnell b2895a5876 add test cases to large.yml 2020-06-15 15:34:35 +08:00
Ilan Schnell 2f884c9379 disable debug output files 2020-06-15 15:34:35 +08:00
Ilan Schnell ec288fec0e add comment to large.yml 2020-06-15 15:34:35 +08:00
Ilan Schnell e8bc39274d add test case to install cachecontrol 2020-06-15 15:34:35 +08:00
Ilan Schnell 7b4bfcb03b work around bug in wheel generation for names which have "-" i them 2020-06-15 15:34:35 +08:00
Ilan Schnell 5e707eec4b add large yaml test 2020-06-15 15:34:35 +08:00
Ilan Schnell ecfaf9fd85 add linter check to ensure version is string 2020-06-15 15:34:34 +08:00
Ilan Schnell ed3a6bcd62 add triangle conflict test 2020-06-15 15:34:34 +08:00
Ilan Schnell 057cb03990 add fall back test 2020-06-15 15:34:34 +08:00
Ilan Schnell 279bbc7d95 update comments 2020-06-15 15:34:34 +08:00
Ilan Schnell 2f961cdfa7 add explaination of yaml format 2020-06-15 15:34:34 +08:00
Ilan Schnell a941724aa8 add test case 2020-06-15 15:34:34 +08:00
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