diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-20 10:34:25 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-20 10:37:57 -0500 |
commit | d92f778b6c88c8a36c4aecac9543d9297c425096 (patch) | |
tree | f49bb90de25cc9625d1f97fa8c67ba32accd12cb /setuptools/tests | |
parent | 6d4e23882a5b1e1f31fb452aaad9d19cf0d02604 (diff) | |
download | external_python_setuptools-d92f778b6c88c8a36c4aecac9543d9297c425096.tar.gz external_python_setuptools-d92f778b6c88c8a36c4aecac9543d9297c425096.tar.bz2 external_python_setuptools-d92f778b6c88c8a36c4aecac9543d9297c425096.zip |
Rewrite selective PIP_IGNORE_REQUIRES_PYTHON to allow test dependencies in metadata to be installed without ignoring REQUIRES_PYTHON
Diffstat (limited to 'setuptools/tests')
-rw-r--r-- | setuptools/tests/test_virtualenv.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index b009fbd6..6549a6c0 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -13,6 +13,17 @@ from .test_easy_install import make_nspkg_sdist @pytest.fixture(autouse=True) +def disable_requires_python(monkeypatch): + """ + Disable Requires-Python on Python 2.7 + """ + if sys.version_info > (3,): + return + + monkeypatch.setenv('PIP_IGNORE_REQUIRES_PYTHON', 'true') + + +@pytest.fixture(autouse=True) def pytest_virtualenv_works(virtualenv): """ pytest_virtualenv may not work. if it doesn't, skip these |