Skip to content

Commit

Permalink
Avoid hitting network during test_easy_install
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 16, 2021
1 parent fa6229b commit a499dee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/2525.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid hitting network during test_easy_install.
10 changes: 10 additions & 0 deletions setuptools/tests/test_easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
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':
Expand Down

0 comments on commit a499dee

Please sign in to comment.