Commit Graph

52 Commits

Author SHA1 Message Date
Nguyễn Gia Phong c84ef7a67c Mark tests using remote svn and hg as xfail
The source repositories for testing is no longer available.
2020-08-24 09:43:50 +07:00
Stéphane Bidoul ccdfa74d79
Reduce reliance on .egg-info directories in test suite
Make more tests run with with_wheel and test
that a .dist-info directory is created.
2020-07-25 13:02:20 +02:00
Paul Moore 9626dacec5 Some tests need to monkeypatch the new resolver internals 2020-06-18 15:49:18 +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
Paul Moore c2fa0dd997 Add a mark for tests that fail on the new resolver 2020-05-21 15:39:00 +01:00
Jason R. Coombs 6282a307dc 👹 Feed the hobgoblins (delint). 2020-03-06 12:43:10 -05:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Chris Hunt 7af9371176 Remove redundant expect_error=False in tests
This is the default, so there is no need to specify it explicitly.
2020-01-03 14:25:36 +01:00
Pradyun Gedam 8981895b5e
Skip all failing tests when using venv
Our isolation logic for venv isn't correct and that is causing these
tests to fail. The culprits for this are:

  tests/lib/venv.py::VirtualEnvironment.user_site_packages
  tests/lib/venv.py::VirtualEnvironment.sitecustomize

Both these together are supposed to create an environment to isolate the
tests. However, they were written for virtualenv and make assumptions
that are not true for environments created with venv. Until we can fix
VirtualEnvironment to properly isolate the test from the underlying test
environment when using venv, these tests will continue to fail.

This is blocking an important bugfix for users facing issues with since
pip is installing packages into `--user` when run in a venv, even when
`--user` isn't visible from that environment.

As a temporary band-aid for this problem, I'm skipping these tests to
unblock us from shipping the bugfix for the aforementioned issue.

The test isolation logic should be fixed to work for venv. Once such a
fix is made, this commit should be reverted.
2019-11-05 23:02:45 +05:30
Harsh Vardhan 0e6ac42c93 Add need_svn decorator for tests which require svn
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
2019-10-15 17:22:16 +05:30
Chris Jerdonek 188ec6ff4e Don't pass "/trunk" when calling local_checkout() with svn. 2019-09-21 03:29:34 -07:00
Chris Jerdonek 9a765b8cab Change local_checkout() to accept tmpdir. 2019-09-13 21:41:32 -07:00
Chris Hunt 39ac9ca351 Rename compatible functions in tests.lib.path.Path. 2019-07-02 18:48:44 -04:00
Florian Rathgeber 6278c6c371 Decorate tests using SVN with pytest.mark.svn (#5944) 2018-11-10 17:13:20 +05:30
Benoit Pierre a4209aa0fb tests: add support for using venv for the virtual environment
Add a new testsuite option `--use-venv` to enable the use of `venv`
for creating a test virtual environment. The option is opt-in because
creating a `venv` environment does not work right when running under a
`virtualenv`; which is why `tox-venv` must be used in combination with
tox.
2018-10-21 21:43:32 +02:00
Benoit Pierre add3801163 tests: rework tests virtual environment
- cleanup virtualenv creation code
- ensure all testing virtual environments use a recent version
  of setuptools / wheel, making it easier to switch to custom
  versions of those, as well as reducing network accesses
- reduce size of testing virtual environment, slightly speeding
  up the testsuite
2018-10-18 23:28:37 +02:00
Pradyun Gedam 4fc697847a
Update imports for the moved compat module 2018-07-29 18:32:20 +05:30
Pradyun S. Gedam 16cda3069d Cleanup and rename test 2017-10-04 18:55:04 +05:30
Pradyun S. Gedam ebf06ceb9d Merge master 2017-10-04 16:58:31 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Thomas Kluyver ad50ac98ba Install 'wheel' for test that now requires it 2017-07-05 20:06:11 -04:00
Thomas Kluyver 1c03c1b092 Remove string formatting operation 2017-07-05 20:06:11 -04:00
Thomas Kluyver 5610636500 Update test to check for dist-info 2017-07-05 20:06:11 -04:00
Pradyun S. Gedam 9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Xavier Fernandez 5b7060a20d Deprecate the _strip_postfix function (#4174)
It only happens for editable-non-file URLs and is an undocumented
behavior.
2017-02-13 10:02:20 +01:00
Xavier Fernandez 5055d05a9a Fix always true assertion 2016-03-03 10:32:06 +01:00
Xavier Fernandez 9457300142 Fix tests when wheel is available in global site packages
Make sure we are installing via setuptools and not wheels so that we get
egg-info directories.
2015-12-16 00:12:18 +01:00
Matthias Bussonnier cdb1dc7685 imp deprecated on 3.4
importing it prevent to debug other packages with `-W error` as the
deprecation warning will raise.

Though there is still imp imported from a few vendorized packages,
and for other purposes than cache_from_source.
2015-05-02 10:48:25 -07:00
Donald Stufft a88bc0de73 Send log messages >= logging.WARNING to stderr 2015-04-06 23:11:16 -04:00
Matej Stuchlik c5024dc851 Mark tests requiring Internet access 2015-01-15 00:53:15 +01:00
Donald Stufft 5f0692b40a Fix for latest setuptools 2014-12-13 12:38:55 -05:00
Marcus Smith 9d01010672 fix false positive tests due to assert tuple syntax 2014-10-08 21:51:14 -07:00
Matthew Iversen dcb0ee0702 Move backwardcompat package to compat module 2014-05-14 13:10:06 +10:00
Marcus Smith ca55f9f8b1 remove unused imports 2014-03-29 09:54:05 -07:00
Marcus Smith 8d37e2abcf turn on --user tests for pypy 2014-03-29 09:48:12 -07:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04: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
Marcus Smith a7c522da97 fix references to req methods/classes after refactor 2014-01-12 10:05:11 -08:00
Marcus Smith b42dcc6973 move --user uninstall tests to dedicated module 2013-11-29 17:15:50 -08:00
Marcus Smith 861023bc0d uninstalling --user dists should leave global scripts alone 2013-11-29 17:08:43 -08: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 487925ea3f Isolate the tests from the shared data directory 2013-08-27 06:49:35 -04:00
Donald Stufft f9a3b97b41 Explicitly pass around a directory for tests.lib.local_repos 2013-08-27 06:47:25 -04:00
Donald Stufft 0c42245f21 Replace explicit calls to reset_env() with the script fixture 2013-08-27 06:47:23 -04:00
Donald Stufft 9894c8baac Refactor tests.lib
* Move virtualenv creation out of TestPipEnvironment
* Remove global state and force explicit use of TestPipEnvironment
  instances
* Remove "backup" virtualenv copying and instead create new
  virtual environments each time.
* Remove the monkeypatched "PyPICache" functionality
* Remove things that were not being used anymore and were dead
  weight
* Remove sitecustomize support which was primarily used to
  monkeypatch the "PyPICache" but was used in one or two other
  tests.
2013-08-21 22:40:16 -04:00
Donald Stufft da0bc4b1d1 Switch to using py.test as the test runner instead of nose
* Better output with the bare asserts we use throughout the tests
* Function fixtures are pretty nice, especially as a way to
  start a background server or create an isolated virtualenv
2013-08-21 10:19:58 -04:00
Marcus Smith bea1f6ca2f method call syntax error 2013-06-13 22:55:32 -07:00