Commit Graph

113 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
Chris Hunt 89572a7d40 Throw CommandError on any location-related install options 2020-07-07 19:11:11 -04:00
Chris Hunt b46d8ab01a Refactor overriding test to not use disallowed option
Similar to our previous test refactoring, this removes the usage of
`--home` from the test command.

"Overriding" in the original test meant "placed after" in the
command-line arguments, which makes sense because setuptools will use
the last argument passed.
2020-07-07 19:11:02 -04:00
Chris Hunt 50d7b930d3 Create more robust test for isolated --install-option
The current test depends on passing `--home` to `--install-option`.
Since we would like that to fail, we need to use another argument. None
of the other possible arguments have a visible side-effect, so we just
write the provided arguments to a file and check that in the test.
2020-07-07 19:10:27 -04:00
Pradyun Gedam 28592d4c31
Allow for the deprecation warning in tests 2020-07-05 01:01:02 +05:30
Tzu-ping Chung 95477931b2 Mark new resolver test failure on extra union 2020-06-23 20:45:41 +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
Tzu-ping Chung 03c59c50db Make failing tests fail 2020-06-10 20:57:23 +08:00
Tzu-ping Chung b372132cac Convert test_install_with_extras_from_install 2020-06-10 12:34:09 +01: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 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
Tzu-ping Chung 92a687ce66 Make failing test fail 2020-06-02 11:51:39 +08:00
Tzu-ping Chung 8586098b18 These tests should pass now 2020-05-27 23:18:33 +08:00
gutsytechster fa06ccf054 tests(test_install_{reqs, upgrade}): add methods for path lookups 2020-05-26 20:13:28 +05:30
Paul Moore c2fa0dd997 Add a mark for tests that fail on the new resolver 2020-05-21 15:39:00 +01:00
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
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Deepak Sharma b242c3979a String formatting updated 2020-01-23 18:09:59 +05:30
Chris Hunt e53d10db01 Remove unnecessary uninstall
Since a new temporary script path is used for each test, no need to do
uninstall.
2020-01-11 19:39:12 -05:00
Chris Hunt f89013daa4 Parametrize editable for relative install tests 2020-01-11 19:37:10 -05:00
Chris Hunt 2801de5825 Parametrize long relative install tests
This lets us make better use of parallelization and will let us remove
the unnecessary uninstallation from these individual tests.
2020-01-11 19:32:44 -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
Chris Hunt b8f626ace6 Deprecate install-location-related options in --install-option 2019-11-30 17:42:48 -05: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
Pradyun Gedam 37bc629551
Rename tests.lib.path.Path.{abspath -> resolve()} 2019-10-07 18:01:06 +05:30
Pradyun Gedam 7d72b3e034
Update uses of path subtraction to os.path.relpath 2019-10-07 12:38:22 +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 0a6b3cedae Remove unnecessary expect_error. 2019-08-10 22:39:57 -04:00
Pradyun Gedam 145a753cd3
Update tests for eagerly populated links 2019-07-29 20:31:52 +05:30
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Chris Hunt 39ac9ca351 Rename compatible functions in tests.lib.path.Path. 2019-07-02 18:48:44 -04:00
Chris Jerdonek 24688ee8e8 Revert "Require --no-use-pep517 if using editable mode with pyproject.toml."
This reverts commit 71f506e71e.
2019-04-26 20:19:05 -07:00
Chris Jerdonek 71f506e71e Require --no-use-pep517 if using editable mode with pyproject.toml. 2019-03-31 05:40:08 -07:00
Miro Hrončok 75c2201d5a Mark 3 tests as network tests
________________ test_constraints_local_editable_install_pep518 ________________
    ...
    ----------------------------- Captured stdout call -----------------------------
    Script result: python -m pip download setuptools wheel -d /tmp/pytest-of-mockbuild/pytest-0/test_constraints_local_editabl0/data/packages
      return code: 1
    -- stderr: --------------------
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb160>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb0b8>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb4e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb6d8>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb860>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
      Could not find a version that satisfies the requirement setuptools (from versions: )
    No matching distribution found for setuptools

    _____________ test_pep517_wheels_are_not_confused_with_other_files _____________
    ...
    -- stdout: --------------------
    Processing /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/data/src/withpyproject
      Installing build dependencies: started
      Installing build dependencies: finished with status 'error'
      Complete output from command /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.0.2-1.fc30.x86_64/usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/workspace/tmp/pip-build-env-3un7dqu3/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel:
      Collecting setuptools
        Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5a8898>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
        Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9588>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
        Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9470>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
        Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9278>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
        Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9208>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
        Could not find a version that satisfies the requirement setuptools (from versions: )
      No matching distribution found for setuptools

    ________________________ test_upgrade_argparse_shadowed ________________________
    ...
    ----------------------------- Captured stdout call -----------------------------
    Script result: python -m pip install argparse==1.3
      return code: 1
    -- stderr: --------------------
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db240>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db358>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db400>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db518>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6c7710>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
      Could not find a version that satisfies the requirement argparse==1.3 (from versions: )
    No matching distribution found for argparse==1.3
2019-02-13 13:01:04 +01:00
Pradyun Gedam 7222cb8fdb
Remove --process-dependency-links and related support code 2019-01-02 17:27:06 +05:30
Florian Rathgeber 6278c6c371 Decorate tests using SVN with pytest.mark.svn (#5944) 2018-11-10 17:13:20 +05:30
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
Phil Pennock cb529e677b reduce new pylint complaints
Mostly indentation complaints, plus an unused test parameter, fixed.
Leaves one new pylint complaint, which is about a test function naming
issue which affects every test.
2018-03-20 17:32:22 -04:00
Phil Pennock 23cd8f6899 Keep install options in requirements.txt from leaking
The list of install options passed into the setup routine is mutable,
passed by reference, so adding items for "this package" to that list
mutates the options for all subsequent packages.

Isolate the lists before mutating them.

Includes a functional test, which has been confirmed to fail without
this fix.

Fixes #3763
Fixes #4453
Fixes #5089
2018-03-20 16:23:34 -04:00
Paul Moore 34cc364903
Merge pull request #4999 from xoviat/pep518-editable
Run setup.py develop inside of PEP 518 build environment
2018-03-02 08:40:17 +00:00
xoviat 76f62b7129 🎨 2018-03-01 12:41:32 -06:00
xoviat 9280d17873 Download setuptools and wheel to packages 2018-01-28 17:10:56 -06:00
xoviat 736cd67d9d Add regression test 2018-01-28 16:44:38 -06:00
Ed Morley 4b81388199 Use log level info when ignoring packages due to environment markers
The use of environment markers implies that the user expects the
packages to not be installed in some cases (eg depending on version
of Python), so the log output shouldn't be classed as a warning,
particularly since this results in it being sent to `stderr` rather
than `stdout`.

Fixes #4876.
2018-01-28 15:36:23 +00:00
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Benoit Pierre 961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01:00