Commit Graph

68 Commits

Author SHA1 Message Date
Benoit Pierre 06fb565f0c tests: drop `package4` test data
No need for a wheel of `simple` now that build dependencies support source installs.
2018-06-26 10:40:23 +02:00
Kexuan Sun 14fe337bcf Improve autocompletion function on file name completion (#5125) 2018-06-21 22:59:31 +05:30
Benoit Pierre ca4e2ad6ad improve handling of PEP 518 build requirements
Offload more work to the underlying pip command used to install the
build requirements, so there's no need to duplicate code to handle
environment markers/extras. This is done by setting the correct options
from the finder passed in argument to `_install_build_reqs`.
2018-05-18 23:45:55 +02:00
Donald Stufft 90b3db476f Drop support for Python 3.3 2018-05-17 13:34:48 -04:00
luz.paz 209b0c6c10 Misc. trivial typos
Found via `codespell -q 3`
2018-03-27 06:51:44 -04:00
Anthony Sottile e21e2d3f8f Upgrade syntax in ./tests
Changes were automated via https://github.com/asottile/pyupgrade

See #4921
2017-12-14 21:59:41 -08:00
Benoit Pierre 961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01:00
Benoit Pierre 3dd4a446f7 tests: fix virtualenv support when using PyPy 3 2017-09-02 02:18:33 +02:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 841f5dfb5c Add support for YAML based test files (#4637) 2017-08-07 12:03:43 -04:00
Pradyun S. Gedam 32c8f42729 Add a new create_file helper and use it 2017-06-14 10:13:04 +05:30
Alex Gaynor d11b3877e9 Remove use of legacy u() syntax 2017-03-24 14:21:22 -04:00
Donald Stufft 6b54145783 Deprecate support for Python 3.3 2017-03-22 19:22:56 -04:00
Donald Stufft 59cb562d59 Fix up some bookkeeping 2017-03-18 14:52:14 -04:00
Xavier Fernandez a12f2f493c Reimplement pip check tests without network
Add small test for complex dependency names
2016-11-13 22:51:15 +01:00
Alex Gaynor e86b0af72e fix for the tests 2016-01-01 21:46:29 -05:00
Stéphane Bidoul 7d7b50a990 add freeze test with git subdirectory and srcdir 2015-12-04 14:40:24 +01:00
Stéphane Bidoul b8549e3629 refactor test vcs package creation
factor out the vcs add/commit part
2015-12-04 14:40:24 +01:00
Erik Rose 1e41f01823 Add checks against requirements-file-dwelling hashes for most kinds of packages. Close #1175.
* Add --require-hashes option. This is handy in deployment scripts to force application authors to hash their requirements. It is also a convenient way to get pip to show computed hashes for a virgin, unhashed requirements file. Eventually, additions to `pip freeze` should fill a superset of this use case.
  * In --require-hashes mode, at least one hash is required to match for each requirement.
  * Option-based requirements (--sha256=...) turn on --require-hashes mode implicitly.
  * Internet-derived URL-based hashes are "necessary but not sufficient": they do not satisfy --require-hashes mode when they match, but they are still used to guard against transmission errors.
  * Other URL-based requirements (#md5=...) are treated just like flag-based ones, except they don't turn on --require-hashes.
* Complain informatively, with the most devastating errors first so you don't chase your tail all day only to run up against a brick wall at the end. This also means we don't complain that a hash is missing, only for the user to find, after fixing it, that we have no idea how to even compute a hash for that type of requirement.
  * Complain about unpinned requirements when hash-checking mode is on, lest they cause the user surprise later.
  * Complain about missing hashes.
  * Complain about requirement types we don't know how to hash (like VCS ones and local dirs).
* Have InstallRequirement keep its original Link around (original_link) so we can differentiate between URL hashes from requirements files and ones downloaded from the (untrustworthy) internet.
* Remove test_download_hashes, which is obsolete. Similar coverage is provided in test_utils.TestHashes and the various hash cases in test_req.py.
2015-09-24 22:16:00 -04:00
Xavier Fernandez 0d022c5ba0 fix PipTestEnvironment to use Path object
needed since
63cb4c725d
2015-09-22 10:48:23 +02:00
Mathew Jennings 417f79d8b8 Add `pip download` command and deprecate `pip install --download`.
`pip download` has the same functionality as `pip install --download`,
and the behavior of `pip install --download` is preserved with a deprecation
warning.  `pip install --download` will be removed in pip version 10.
2015-09-13 17:41:00 -04:00
Marc Abramowitz f6dda5aa80 Less network deps in test_install 2015-03-19 03:54:09 -07:00
Marc Abramowitz 987ce2b3b1 test_install: Less deps on external stuff
so that tests are faster and less likely to fail intermittently,
especially on Travis CI, where the networking is flakey.
2015-03-16 17:50:16 -07:00
Cory Benfield 06ea5fc05d Create pyversion_tuple 2015-03-15 15:32:47 +00:00
Cory Benfield a792ad3a7a Expect urllib3 platform warnings. 2015-03-15 14:56:08 +00:00
Paul Moore 5a32a4d34a Merge pull request #2525 from msabramo/test_freeze_mercurial_clone_remove_dep_on_bitbucket
test_freeze_mercurial_clone: no dep on bitbucket
2015-03-12 11:03:42 +00:00
Marc Abramowitz 415fca8bf7 test_freeze_mercurial_clone: no dep on bitbucket 2015-03-11 22:29:58 -07:00
Marc Abramowitz 5622755753 _create_test_package use path_to_url for svn
because `path_to_url` is smarter than the ad-hoc code I hacked together.
In particular, it works on Windows, whereas my code didn't. This
prevents the following error on Windows:

    Script result: svn import c:\users\admini~1\appdata\local\temp\pytest-27\test_freeze_svn0\workspace\scratch\version_pkg file://c:\users\admini~1\appdata\local\temp\pytest-27\test_freeze_svn0\workspace\scratch\pip-test-package-repo\trunk -m Initial import of pip-test-package
      return code: 1
    -- stderr: --------------------
    svn: E170000: Illegal repository URL 'file://c:%5cusers%5cadmini~1%5cappdata%5clocal%5ctemp%5cpytest-27%5ctest_freeze_svn0%5cworkspace%5cscratch%5cpip-test-package-repo%5ctrunk'
2015-03-11 19:02:19 -07:00
Marc Abramowitz 7f5566fea4 Make test_freeze_bazaar_clone not depend on bazaar.launchpad.net 2015-03-11 15:07:35 -07:00
Marc Abramowitz f4ee579304 test_freeze_svn: No dep on bitbucket
Instead of using local_checkout, which downloads a 204 KB dump file from
http://bitbucket.org/hltbra/pip-initools-dump/raw/8b55c908a320/INITools_modified.dump,
use `svnadmin create` and `svn import` to create an svn repo on the fly.
2015-03-11 10:26:35 -07:00
Donald Stufft 0bc8aa5622 Style fixes for the latest flake8 2015-02-24 07:46:10 -05:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00
Marcus Smith b0b05737a9 Merge pull request #1787 from qwcode/wheel_editables
build wheels for dependencies of editables
2014-05-09 15:00:50 -07:00
Donald Stufft 97d8bee705 Isolate our tests from the running user's configuration 2014-05-07 16:17:07 -04:00
Marcus Smith 12034176a1 build wheels for dependencies of editables 2014-05-03 10:12:57 -07:00
Donald Stufft e3873b1be8 Merge pull request #1704 from jamezpolley/develop
If at first you can't stat the index file, try again
2014-05-03 07:46:29 -04:00
James Polley 58097b64c4 Add tests (and data required for tests) for new code that enables retry
if we can't stat a file while using a file:/// index-url.
2014-04-30 12:03:55 +10:00
Paul Moore 92c3a673fd Fix tests on Windows, where Path objects were changing to strings mysteriously... 2014-04-28 15:38:39 +01:00
Matthew Iversen d1a7130246 Fix compatibility with wheel 0.23.0
wheel now only produces the major python version for the tag of pure
distributions, so expect that instead.
2014-04-03 10:49:27 +11:00
Marcus Smith 2264dc4398 lib path fixes for pypy tests 2014-03-29 20:17:10 -07:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
Matthew Iversen 4008c0a111 Fix tests for subdirectory install
- make assert_install test clearer
- Add option allowing for testing install from an editable subdirectory
2014-03-09 05:33:05 +11:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Donald Stufft 9f027337a8 Use Flake8 on the test of pip's Python files 2014-01-28 19:47:58 -05:00
Paul Nasrat 951ef7438c Merge remote-tracking branch 'niedbalski/develop' into subdirectory-editable
Conflicts:
	CHANGES.txt
	tests/functional/test_install_reqs.py
	tests/lib/__init__.py
	tests/unit/test_req.py

Additional work - refactored tests to new style.
2013-09-27 14:42:05 -04:00
Marcus Smith f6d242aeea merge from 1.4.X 2013-09-01 13:15:45 -07:00
Marcus Smith 1afdc665ae don't override distutils scripts location using pip's legacy logic 2013-08-31 15:28:44 -07:00
Donald Stufft 5fece08556 Hide assert_raises_regexp in the traceback 2013-08-27 06:49:40 -04:00
Donald Stufft fe60a1d5cf Use a constant for the source directory 2013-08-27 06:49:40 -04:00
Donald Stufft bacf3a0091 Wrap the test data in a helper that will copy to the tmpdir
This is needed because the various activities that exericsing the
tests do will cause files to change inside this data directory. If
we do not make it test specific then we run into concurrency issues.
2013-08-27 06:47:26 -04:00