summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-04-16 14:44:42 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-04-30 21:36:09 +0100
commitbd121f08b62cce03edc4e9d4ba4f1f273767abf5 (patch)
tree867fcb9d48f19c919fdb3afd42cf9ec48927a0e0 /gnu/packages
parent71f3507a705fadcf9d5da7b0321bd1acae48f7a1 (diff)
downloadguix-bd121f08b62cce03edc4e9d4ba4f1f273767abf5.tar.gz
gnu: python-pytest-socket: Update to 0.7.0.
* gnu/packages/python-check.scm (python-pytest-socket): Update to 0.7.0.

Change-Id: I879064eba2f4d93d2e2b519ebdf613685d5b5df9
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-check.scm31
1 files changed, 23 insertions, 8 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index b39709d960..777791cb6c 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -420,13 +420,17 @@ interactions, which will update them to correspond to the new API.")
 (define-public python-pytest-socket
   (package
     (name "python-pytest-socket")
-    (version "0.5.1")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "pytest-socket" version))
-              (sha256
-               (base32
-                "1dkr86nxkxc0ka3rdnpmk335m8gl1zh1sy8i7w4w1jsidbf82jvw"))))
+    (version "0.7.0")
+    (source
+     (origin
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/miketheman/pytest-socket")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1m6s07gvljq82hiajzy1v123kpkciziiqdjqfnas169rmzg0bmnp"))))
     (build-system pyproject-build-system)
     (arguments
      (list
@@ -440,7 +444,18 @@ interactions, which will update them to correspond to the new API.")
                     " and not test_httpx_fails"
                     " and not test_disabled_urllib_fails"
                     " and not test_urllib_succeeds_by_default"
-                    " and not test_enabled_urllib_succeeds"))))
+                    " and not test_enabled_urllib_succeeds"
+                    " and not test_single_cli_arg_connect_disabled_hostname_resolved"))
+     #:phases
+       #~(modify-phases %standard-phases
+           ;; See <https://github.com/miketheman/pytest-socket/issues/308>
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             (substitute* (list "tests/test_async.py"
+                                "tests/test_socket.py"
+                                "tests/test_precedence.py")
+               (("from tests.common import assert_socket_blocked")
+                "from common import assert_socket_blocked")))))))
     (native-inputs (list python-httpx
                          python-poetry-core
                          python-pypa-build