aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-04-26 16:07:34 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-04-26 16:11:11 +0200
commit41ba9df6ba3b18cd2f7d92c82447111399342a10 (patch)
treecc6d72cb50f9e81355a46a6b732c226a29104b16 /gnu/packages/python-web.scm
parent81ec8eba917e0c9dff6dc281746fb25f0fa2802e (diff)
downloadguix-41ba9df6ba3b18cd2f7d92c82447111399342a10.tar
guix-41ba9df6ba3b18cd2f7d92c82447111399342a10.tar.gz
gnu: python-tornado: Run a lot more tests and fix collections.
* gnu/packages/python-web.scm (python-tornado)[arguments]: Do run tests; add phase 'fix-collections.
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm38
1 files changed, 27 insertions, 11 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 070aee99b9..770778590d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2246,17 +2246,33 @@ data.")
"02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
(build-system python-build-system)
(arguments
- '(;; FIXME: Two tests error out with:
- ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
- ;; #:phases
- ;; (modify-phases %standard-phases
- ;; (replace 'check
- ;; (lambda _
- ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
- ;; ;; "tornado/platform/kqueue.py". This is the supported method:
- ;; (invoke "python" "-m" "tornado.test.runtests")
- ;; #t)))
- #:tests? #f))
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'fix-collections
+ (lambda _
+ (substitute* "tornado/httputil.py"
+ (("collections.MutableMapping")
+ "collections.abc.MutableMapping"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (substitute* "tornado/test/runtests.py"
+ (("\"error\", category=DeprecationWarning")
+ "\"ignore\", category=DeprecationWarning")
+ ;; Disable tests that use SSL.
+ (("'tornado.test.simple_httpclient_test',") "")
+ (("'tornado.test.iostream_test',") "")
+ (("'tornado.test.httpserver_test',") "")
+ ;; Some timeouts are triggered in these two modules
+ (("'tornado.test.queues_test',") "")
+ (("'tornado.test.locks_test',") ""))
+ ;; Skip all network tests
+ (setenv "NO_NETWORK" "1")
+ ;; Skip timing-relevant tests
+ (setenv "TRAVIS" "1")
+ (invoke "python" "-m" "tornado.test.runtests"
+ "--verbose=yes")))))))
(native-inputs
(list python-certifi))
(home-page "https://www.tornadoweb.org/")