1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-10 15:10:37 +02:00

gnu: python-matrix-nio: Use test-flags.

* gnu/packages/matrix.scm (python-matrix-nio)[arguments]: Remove custom 'check
phase; disable some tests using #:test-flags.

Change-Id: Ib7c826b1746c418f8c917581695a63a486c4acd7
This commit is contained in:
Ricardo Wurmus
2025-01-01 19:56:09 +01:00
parent 38065d8104
commit e0f6eeebe8

View File

@@ -5,6 +5,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -169,8 +170,14 @@ homeserver and generally help bootstrap the ecosystem.")
(base32 "110wg1grhqqgwvlgr98r2k8wxcggpj7lbdwmgkgmi2l7qj1vw3dm"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(list
#:test-flags
'(list "tests" "-k"
(string-append
"not test_upload_binary_file_object "
"and not test_connect_wrapper"))
#:phases
'(modify-phases %standard-phases
(add-after 'unpack 'relax-requirements
(lambda _
(substitute* "pyproject.toml"
@@ -182,17 +189,7 @@ homeserver and generally help bootstrap the ecosystem.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively (string-append
(assoc-ref inputs "tests") "/tests")
"tests")
#t))
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
(add-installed-pythonpath inputs outputs)
;; FIXME: two tests fail, for unknown reasons
(invoke "python" "-m" "pytest" "-vv" "tests" "-k"
(string-append
"not test_upload_binary_file_object "
"and not test_connect_wrapper"))))))))
"tests"))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-poetry-core" ,python-poetry-core)