diff options
author | Benoit Pierre <benoit.pierre@gmail.com> | 2019-01-28 23:07:59 +0100 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2019-02-22 19:39:27 -0600 |
commit | 82db4c621974659513effae337d47a05e31fe7a5 (patch) | |
tree | 99d6df37e06d1bc3d1f67741e5b4348bb7ea5638 | |
parent | 6575418283ec605f6bca82c525f6680d897ce282 (diff) | |
download | external_python_setuptools-82db4c621974659513effae337d47a05e31fe7a5.tar.gz external_python_setuptools-82db4c621974659513effae337d47a05e31fe7a5.tar.bz2 external_python_setuptools-82db4c621974659513effae337d47a05e31fe7a5.zip |
tests: improve `test_pip_upgrade_from_source`
Parametrize the test to check different versions of pip
(including master) are correctly supported.
-rw-r--r-- | setuptools/tests/test_virtualenv.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 3d5c84b0..bd89fd64 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -52,10 +52,24 @@ def test_clean_env_install(bare_virtualenv): )).format(source=SOURCE_DIR)) -def test_pip_upgrade_from_source(virtualenv): +@pytest.mark.parametrize('pip_version', ( + 'pip==9.0.3', + 'pip==10.0.1', + 'pip==18.1', + 'pip==19.0.1', + 'https://github.com/pypa/pip/archive/master.zip', +)) +def test_pip_upgrade_from_source(virtualenv, pip_version): """ Check pip can upgrade setuptools from source. """ + # Install pip/wheel, and remove setuptools (as it + # should not be needed for bootstraping from source) + virtualenv.run(' && '.join(( + 'pip uninstall -y setuptools', + 'pip install -U wheel', + 'python -m pip install {pip_version}', + )).format(pip_version=pip_version)) dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( |