aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-02-11 11:50:43 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-02-11 21:03:06 +0000
commit592a6e1cebf2213c4e24919245edc28497d0f107 (patch)
tree044aae73a08f95c937ad8b672d402325b31b1c63 /gnu/packages/python-check.scm
parent5ccae1ae44b6f2b3f8a687611d61194a14dc1e0f (diff)
downloadguix-592a6e1cebf2213c4e24919245edc28497d0f107.tar
guix-592a6e1cebf2213c4e24919245edc28497d0f107.tar.gz
gnu: python-pytest-socket: Simplify package, enable tests.
* gnu/packages/python-check.scm (python-pytest-socket) [build-system]: Swap to pyproject-build-system. [arguments] <#:test-flags>: Disable tests requiring network access. <#:phases>: Use standard phases. Change-Id: Ib7fe0b3dab4e269c00856a10b8ca23acc8c8e180
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm37
1 files changed, 13 insertions, 24 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 315ea74459..51a38bbcbe 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -426,31 +426,20 @@ interactions, which will update them to correspond to the new API.")
(sha256
(base32
"1dkr86nxkxc0ka3rdnpmk335m8gl1zh1sy8i7w4w1jsidbf82jvw"))))
- (build-system python-build-system)
+ (build-system pyproject-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")))))))
+ (list
+ #:test-flags
+ #~(list "-k" (string-append
+ ;; Disable test requiring network access.
+ "not test_disable_socket_urllib"
+ " and not test_parametrize_with_socket_enabled_and_allow_hosts"
+ " and not test_global_disable_and_allow_host"
+ " and not test_asynctest"
+ " and not test_httpx_fails"
+ " and not test_disabled_urllib_fails"
+ " and not test_urllib_succeeds_by_default"
+ " and not test_enabled_urllib_succeeds"))))
(native-inputs (list python-httpx
python-poetry-core
python-pypa-build