From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 58530@debbugs.gnu.org
Subject: [bug#58530] [PATCH 3/4]: gnu: Add pytest-socket
Date: Fri, 14 Oct 2022 22:12:32 +0100 [thread overview]
Message-ID: <CAO+9K5o+MNvaWUqruy+rhQF5kBrD1oBKWV1be6-3=3YrkoU=xw@mail.gmail.com> (raw)
In-Reply-To: <CAO+9K5qffko8R+3E3WO91yKC3sv4VoXcFUydNTxgB++=VZSxgQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
[-- Attachment #2: 0003-gnu-Add-pytest-socket.patch --]
[-- Type: text/x-patch, Size: 3041 bytes --]
From f5e774473b65f1973756d197d09db415bcb0311c Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Fri, 14 Oct 2022 21:42:06 +0100
Subject: [PATCH 3/4] gnu: Add pytest-socket
* gnu/packages/python-check.scm (python-pytest-socket): New variable.
---
gnu/packages/python-check.scm | 49 +++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 2358e7448d..fd88fc480e 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -395,6 +395,55 @@ (define-public python-vcrpy
interactions, which will update them to correspond to the new API.")
(license license:expat)))
+(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"))))
+ (build-system python-build-system)
+ (arguments
+ ;; FIXME: Tests fail a lot, probably requiring Internet access.
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+ #$version)
+ (setenv "SOURCE_DATE_EPOCH" "315532800")
+ (invoke "python"
+ "-m"
+ "build"
+ "--wheel"
+ "--no-isolation"
+ ".")))
+ (add-before 'check 'disable-unsupported-test
+ (lambda _
+ (substitute* "tests/test_async.py"
+ (("def test_asynctest")
+ "def __off_test_asynctest"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-vvv")))))))
+ (native-inputs (list python-httpx
+ python-poetry-core
+ python-pypa-build
+ python-pytest
+ python-pytest-httpbin
+ python-pytest-randomly
+ python-starlette))
+ (home-page "https://pypi.org/project/pytest-socket/")
+ (synopsis "Pytest plugin to disable socket calls during tests")
+ (description
+ "This package provides Pytest extension which disables all network calls flowing
+through Python's socket interface")
+ (license license:expat)))
+
(define-public python-pytest-ordering
(package
(name "python-pytest-ordering")
--
2.37.3
next prev parent reply other threads:[~2022-10-14 21:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 21:08 [bug#58530] [PATCH 0/4]: gnu: Add parfive Sharlatan Hellseher
2022-10-14 21:11 ` [bug#58530] [PATCH 1/4]: gnu: Add siosocks Sharlatan Hellseher
2022-10-14 21:11 ` [bug#58530] [PATCH 2/4]: gnu: Add aioftp Sharlatan Hellseher
2022-10-14 21:12 ` Sharlatan Hellseher [this message]
2022-10-14 21:12 ` [bug#58530] [PATCH 4/4]: gnu: Add parfive Sharlatan Hellseher
2022-11-06 20:47 ` [bug#58530] Sharlatan Hellseher
2022-11-07 19:55 ` [bug#58530] Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAO+9K5o+MNvaWUqruy+rhQF5kBrD1oBKWV1be6-3=3YrkoU=xw@mail.gmail.com' \
--to=sharlatanus@gmail.com \
--cc=58530@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).