diff --git a/devel/py-pytest-recording/Makefile b/devel/py-pytest-recording/Makefile index 49a42c9d5a59..acdfe843a19b 100644 --- a/devel/py-pytest-recording/Makefile +++ b/devel/py-pytest-recording/Makefile @@ -1,31 +1,31 @@ PORTNAME= pytest-recording -DISTVERSION= 0.13.3 +DISTVERSION= 0.13.4 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION} MAINTAINER= yuri@FreeBSD.org COMMENT= Pytest Plugin that allows recording network interactions via VCR.py WWW= https://github.com/kiwicom/pytest-recording LICENSE= MIT BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}vcrpy>=2.0.1:devel/py-vcrpy@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-httpbin>=0:devel/py-pytest-httpbin@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-mock>=0:devel/py-pytest-mock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}werkzeug>=3.1.3:www/py-werkzeug@${PY_FLAVOR} USES= python USE_PYTHON= pep517 autoplist pytest TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} NO_ARCH= yes -# tests as of 0.13.2: 30 failed, 29 passed, 6 skipped in 42.49s, see https://github.com/kiwicom/pytest-recording/issues/154 +# tests as of 0.13.4: 63 passed, 8 skipped, 55 warnings in 23.68s .include diff --git a/devel/py-pytest-recording/distinfo b/devel/py-pytest-recording/distinfo index e0bd7af07b0b..7de1d7a56db0 100644 --- a/devel/py-pytest-recording/distinfo +++ b/devel/py-pytest-recording/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1745556086 -SHA256 (pytest_recording-0.13.3.tar.gz) = dd018421a956ecc45f112c051b1e323b40d029879b1062853df45b05c6098310 -SIZE (pytest_recording-0.13.3.tar.gz) = 26228 +TIMESTAMP = 1780790608 +SHA256 (pytest_recording-0.13.4.tar.gz) = 568d64b2a85992eec4ae0a419c855d5fd96782c5fb016784d86f18053792768c +SIZE (pytest_recording-0.13.4.tar.gz) = 26576 diff --git a/devel/py-pytest-recording/files/patch-tests_test__blocking__network.py b/devel/py-pytest-recording/files/patch-tests_test__blocking__network.py index 528578d5749b..4b1217ad49b3 100644 --- a/devel/py-pytest-recording/files/patch-tests_test__blocking__network.py +++ b/devel/py-pytest-recording/files/patch-tests_test__blocking__network.py @@ -1,26 +1,37 @@ ---- tests/test_blocking_network.py.orig 2025-04-25 08:03:40 UTC +--- tests/test_blocking_network.py.orig 2020-02-02 00:00:00 UTC +++ tests/test_blocking_network.py -@@ -1,7 +1,7 @@ from io import BytesIO - import json - import sys - from io import BytesIO --from socket import AF_INET, AF_NETLINK, AF_UNIX, SOCK_RAW, SOCK_STREAM, socket -+from socket import AF_INET, AF_UNIX, SOCK_RAW, SOCK_STREAM, socket - - import pytest - import requests -@@ -158,14 +158,6 @@ def test_block_network_blocked_socket(): - def test_block_network_blocked_socket(): - with pytest.raises(RuntimeError, match=r"^Network is disabled$"): +@@ -10,11 +10,9 @@ from pytest_recording.network import blocking_context + + from pytest_recording.network import blocking_context + +-# Windows doesn’t have AF_NETLINK & AF_UNIX + try: +- from socket import AF_NETLINK, AF_UNIX ++ from socket import AF_UNIX + except ImportError: +- AF_NETLINK = None # type: ignore[assignment] + AF_UNIX = None # type: ignore[assignment] + + +@@ -28,7 +26,6 @@ except ImportError as exc: + pycurl = None # type: ignore[assignment] + + +-skip_netlink = pytest.mark.skipif(AF_NETLINK is None, reason="AF_NETLINK not available on this platform") + skip_unix = pytest.mark.skipif(AF_UNIX is None, reason="AF_UNIX not available on this platform") + + +@@ -174,13 +171,6 @@ def test_block_network_blocked_socket(): call("./blocked_socket", AF_UNIX, SOCK_STREAM) -- -- + + -# When not AF_UNIX, AF_INET or AF_INET6 socket is used -# Then socket.socket.connect call is blocked, even if resource name is in the allowed list +-@skip_netlink -@pytest.mark.block_network(allowed_hosts=["./allowed_socket", "127.0.0.1", "0"]) -def test_blocked(): - with pytest.raises(RuntimeError, match=r"^Network is disabled$"): - call((0, 0), AF_NETLINK, SOCK_RAW) # When record is disabled