summaryrefslogtreecommitdiff
path: root/dev-python/pytest-socket/pytest-socket-0.8.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pytest-socket/pytest-socket-0.8.0.ebuild')
-rw-r--r--dev-python/pytest-socket/pytest-socket-0.8.0.ebuild41
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-python/pytest-socket/pytest-socket-0.8.0.ebuild b/dev-python/pytest-socket/pytest-socket-0.8.0.ebuild
new file mode 100644
index 000000000000..6d31e43c3ddb
--- /dev/null
+++ b/dev-python/pytest-socket/pytest-socket-0.8.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=uv-build
+PYPI_VERIFY_REPO=https://github.com/miketheman/pytest-socket
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Pytest Plugin to disable socket calls during tests"
+HOMEPAGE="
+ https://github.com/miketheman/pytest-socket/
+ https://pypi.org/project/pytest-socket/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="
+ >=dev-python/pytest-7.0.0[${PYTHON_USEDEP}]
+"
+
+EPYTEST_PLUGINS=( "${PN}" pytest-http{bin,x} )
+EPYTEST_PLUGIN_LOAD_VIA_ENV=1
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ tests/test_async.py::test_starlette
+ tests/test_restrict_hosts.py::test_help_message
+
+ # require DNS access
+ tests/test_async.py::test_httpx_fails
+ tests/test_combinations.py::test_parametrize_with_socket_enabled_and_allow_hosts
+ tests/test_precedence.py::test_global_disable_and_allow_host
+ tests/test_socket.py::test_urllib_succeeds_by_default
+ tests/test_socket.py::test_enabled_urllib_succeeds
+ tests/test_socket.py::test_disabled_urllib_fails
+)