diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2024-12-02 18:01:42 +0100 |
---|---|---|
committer | Hilton Chain <hako@ultrarare.space> | 2024-12-03 08:24:56 +0800 |
commit | 2c700af42cbb17859a7d80807fef2000cab7f8ad (patch) | |
tree | 8fba3539e8ea2abe48e94d58a0fbafb8c1835a0e | |
parent | dbe1c211220de6fb6a67d872882a57d2cce7a559 (diff) |
gnu: python-falcon: Fix tests.
* gnu/packages/python-web.scm (python-falcon)[native-inputs]: Add
python-orjson.
[arguments]: Do not patch test file; respect test-flags in custom 'check
phase; provide test-flags to ignore examples and benchmarks.
[build-system]: Use pyproject-build-system.
Change-Id: Ic173e2d940a2bb9c7f81ea3e70475f8bfff36dfb
Signed-off-by: Hilton Chain <hako@ultrarare.space>
-rw-r--r-- | gnu/packages/python-web.scm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 2137cc42536..fb43c9b0a06 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1176,17 +1176,19 @@ Interchange Format (SARIF)} file format.") (sha256 (base32 "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:test-flags + '(list "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests") + #:phases + '(modify-phases %standard-phases + (add-before 'check 'set-HOME + (lambda _ (setenv "HOME" "/tmp"))) (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Skip orjson, which requires rust to build. - (substitute* "tests/test_media_handlers.py" - (("== 'CPython") "!= 'CPython")) - (setenv "HOME" "/tmp") - (invoke "pytest" "-vv" "tests")))))) + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "pytest" "-vv" test-flags))))))) (propagated-inputs (list python-mimeparse)) (native-inputs @@ -1197,6 +1199,7 @@ Interchange Format (SARIF)} file format.") python-httpx python-mujson python-msgpack + python-orjson python-pecan python-pillow python-pytest |