diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-01-16 16:36:47 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-01-16 16:36:47 -0500 |
| commit | a499dee61ecdabf867853f24a2bc78a8197c97f1 (patch) | |
| tree | 597e6e5b843b130b7ddeb4291f76c34582228ce3 /setuptools | |
| parent | fa6229bd7e35b18a07e36377ad7a5551b38a786c (diff) | |
| download | python-setuptools-git-a499dee61ecdabf867853f24a2bc78a8197c97f1.tar.gz | |
Avoid hitting network during test_easy_install
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index dc00e697..93ac23e4 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -38,6 +38,16 @@ from .files import build_files from .textwrap import DALS +@pytest.fixture(autouse=True) +def pip_disable_index(monkeypatch): + """ + Important: Disable the default index for pip to avoid + querying packages in the index and potentially resolving + and installing packages there. + """ + monkeypatch.setenv('PIP_NO_INDEX', 'true') + + class FakeDist: def get_entry_map(self, group): if group != 'console_scripts': |
