Skip to content

chore(ci): disable external network calls #13142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore(ci): disable external network calls
As some tests spin up a local server, allow clients to communicate with
local addresses only.

Refs: https://pypi.org/project/pytest-socket/

Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman committed Jan 3, 2025
commit 69e12cd942a630abe60336d9d42ad4adf25a02cd
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ follow_imports = "skip"
#

[tool.pytest.ini_options]
addopts = "--ignore src/pip/_vendor --ignore tests/tests_cache -r aR --color=yes"
addopts = "--ignore src/pip/_vendor --ignore tests/tests_cache -r aR --color=yes --disable-socket --allow-hosts=localhost"
xfail_strict = true
markers = [
"network: tests that need network",
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ installer
pytest
pytest-cov
pytest-rerunfailures
pytest-socket
pytest-xdist
scripttest
setuptools
Expand Down