summaryrefslogtreecommitdiff
path: root/dev-python/pytest-socket
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pytest-socket')
-rw-r--r--dev-python/pytest-socket/Manifest3
-rw-r--r--dev-python/pytest-socket/metadata.xml10
-rw-r--r--dev-python/pytest-socket/pytest-socket-0.7.0-r1.ebuild40
-rw-r--r--dev-python/pytest-socket/pytest-socket-0.8.0.ebuild41
4 files changed, 94 insertions, 0 deletions
diff --git a/dev-python/pytest-socket/Manifest b/dev-python/pytest-socket/Manifest
new file mode 100644
index 000000000000..8d277f293b5a
--- /dev/null
+++ b/dev-python/pytest-socket/Manifest
@@ -0,0 +1,3 @@
+DIST pytest_socket-0.7.0.tar.gz 12389 BLAKE2B e99e607e1a614c1e59a1d0d3a2eb00124e43906af5b25b812e7b7975f80e7b31bf5900403e1618e41583e2438bbd25a17fd984f9460356876305de748a376bd0 SHA512 b32d0077287cbdea19c65f750f904084aeb9ede6b95916a471b4d16ba89648a77b799d33d1b33e1aee0fa7560bd9fe532fc1e59406aee08648efe35499fc936b
+DIST pytest_socket-0.8.0.tar.gz 13912 BLAKE2B 4b4b1754219db8e3afdb1c4802e58e5734d57417ee0feb6e29d9ee7c3439b436c44242c24780bfda36554d0d24e465d9bb612c7bd2170c6c51b84ec65d9f351b SHA512 2ae68d3302e90893094a94a842e0c98b71bc9beef9a54465b3177151353048fe582559123679efc45b688b329a175591d217654e8e3fa0ca237b461206263365
+DIST pytest_socket-0.8.0.tar.gz.provenance 9514 BLAKE2B 11909cc1cd125119868ea271c694875779606e22164f6d1fc50962aee6a437f460c1857fdc44b702adf4fcae0a5adfbfd12b13e942b780f89c77e7036b981f20 SHA512 528f8cb754b570a0323b08b1c3e81921b59ca841b6a1c4e101173bb189c9cf88cd11e9fc958c0b2a8caa51ac7bcb7ea8b8bad696baffc1d6b7804756e0678157
diff --git a/dev-python/pytest-socket/metadata.xml b/dev-python/pytest-socket/metadata.xml
new file mode 100644
index 000000000000..8db24e2dd99b
--- /dev/null
+++ b/dev-python/pytest-socket/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/pytest-socket/pytest-socket-0.7.0-r1.ebuild b/dev-python/pytest-socket/pytest-socket-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..49bbf1d8207b
--- /dev/null
+++ b/dev-python/pytest-socket/pytest-socket-0.7.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+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[${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
+)
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
+)