gnu: python-redis: Fix build.

* gnu/packages/databases.scm (python-redis)
[arguments]<test-flags>: Refactor with 'string-join' to simplify test
skip procedure.
<phases>: Remove 'relax-requirements.
[native-inputs]: Add python-pytest-cov.

Change-Id: I595dc2bfe856ebac834ac7a80ac3862126c6b284
This commit is contained in:
Sharlatan Hellseher 2024-12-13 23:04:14 +00:00
parent 09a342bc78
commit 5aa4f67ed1
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -4439,31 +4439,26 @@ (define-public python-redis
"and not redismod " "and not redismod "
"and not ssl " "and not ssl "
"and not graph") "and not graph")
"-k" (string-append "-k" (string-join
;; The autoclaim test fails with "AssertionError: assert (list
;; [b'0-0', [], []] == [b'0-0', []]". ;; The autoclaim test fails with "AssertionError: assert
"not test_xautoclaim " ;; [b'0-0', [], []] == [b'0-0', []]".
;; These tests cause the following error: "Error 111 "not test_xautoclaim "
;; connecting to localhost:6380. Connection refused." ;; These tests cause the following error: "Error 111
;; (see: https://github.com/redis/redis-py/issues/2109). ;; connecting to localhost:6380. Connection refused."
"and not test_sync " ;; (see: https://github.com/redis/redis-py/issues/2109).
"and not test_psync " "test_sync"
;; Same with: "Error 111 connecting to "test_psync"
;; localhost:6479. Connection refused." ;; Same with: "Error 111 connecting to
"and not test_tfcall " ;; localhost:6479. Connection refused."
"and not test_tfunction_load_delete " "test_tfcall"
"and not test_tfunction_list" "test_tfunction_load_delete"
;; AssertionError: assert 3 == 2 "test_tfunction_list"
"and not test_acl_list")) ;; AssertionError: assert 3 == 2
"test_acl_list")
" and not "))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'relax-requirements
(lambda _
;; FIXME Our version of python-async-timeout is just a little
;; too old, but upgrading it would cause close to 1000 rebuilds.
(substitute* '("requirements.txt" "setup.py")
(("async-timeout>=4.0.3")
"async-timeout>=4.0.2"))))
;; Tests require a running Redis server. ;; Tests require a running Redis server.
(add-before 'check 'start-redis (add-before 'check 'start-redis
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
@ -4475,6 +4470,7 @@ (define-public python-redis
(list python-numpy (list python-numpy
python-pytest python-pytest
python-pytest-asyncio-0.23 python-pytest-asyncio-0.23
python-pytest-cov
python-pytest-timeout python-pytest-timeout
python-setuptools python-setuptools
python-wheel python-wheel