1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

28 commits

Author SHA1 Message Date
Tzu-ping Chung
50e194f107 Selectively enable user site
The modern virtual environment structure does not allow us to enable
"fake user site" while disabling the global site, so we need to do more
fine-grained configuration to correctly set up test environments for
each test case.

With this done, we can also properly support the stdlib venv ad the test
environment backend, since it basically works identically with modern
virtualenv. The incompatible_with_test_venv is thus removed.
2022-10-28 01:51:13 +08:00
Tzu-ping Chung
4ab4865063 One more rewrite to avoid distutils 2022-10-28 01:51:13 +08:00
Jon Dufresne
c71cf88049 Complete type annotations of tests/functional/ directory 2021-11-18 18:26:17 -08:00
Nipunn Koorapati
d03b8a84a2 Run black on tests/functional/test_uninstall_user.py 2021-08-11 13:23:39 +08:00
Andrey Bienkowski
9b2cb894ba Convert more str.format() calls to f-strings 2021-02-13 09:27:17 +03: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
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
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
Chris Hunt
f805f328d4 Align interface of tests.lib.path.Path.mkdir with pathlib.Path.mkdir. 2019-10-06 21:55:10 -04:00
Pradyun Gedam
bc88399d07
Change Path.makedirs() -> Path.mkdir(parents=True) 2019-07-12 13:30:18 +05:30
Chris Hunt
39ac9ca351 Rename compatible functions in tests.lib.path.Path. 2019-07-02 18:48:44 -04: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
Benoit Pierre
961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01: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
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
Matej Stuchlik
c5024dc851 Mark tests requiring Internet access 2015-01-15 00:53:15 +01: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
b42dcc6973 move --user uninstall tests to dedicated module 2013-11-29 17:15:50 -08:00