summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2019-04-17 23:39:39 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2019-04-18 00:07:33 -0400
commite337061b3a7af892d3a14f5191efb2487ec0fad9 (patch)
tree02ed6b2cf1ce06801a9b47f17c7ac75fc304c025 /gnu/packages/python.scm
parent6bbb37a545912c6bb2513ee08587ee4fe39cc330 (diff)
downloadguix-patches-e337061b3a7af892d3a14f5191efb2487ec0fad9.tar
guix-patches-e337061b3a7af892d3a14f5191efb2487ec0fad9.tar.gz
gnu: python: Disable failing tests for Python 2.
Fixes issue #35311 (see: https://bugs.gnu.org/35311). * gnu/packages/python.scm (python-2.7)[make-flags]: Exclude the tests test_urllib2_localnet and test_httplib. * gnu/packages/python.scm (python-3.7)[make-flags]: Do not consider tests exclusions inherited from the python2 package, which leaves Python 3 unchanged.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index aa2f8addcf..a26a88e6d9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -54,7 +54,7 @@
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;;
@@ -147,7 +147,14 @@
(assoc-ref %outputs "out") "/lib"))
;; With no -j argument tests use all available cpus, so provide one.
#:make-flags
- (list (format #f "TESTOPTS=-j~d" (parallel-job-count)))
+ (list (string-append
+ (format #f "TESTOPTS=-j~d" (parallel-job-count))
+ ;; Exclude the following tests as they fail
+ ;; non-deterministically with "error: [Errno 104] Connection
+ ;; reset by peer." Python 3 seems unaffected. A potential fix,
+ ;; yet to be backported to Python 2, is available at:
+ ;; https://github.com/python/cpython/commit/529525fb5a8fd9b96ab4021311a598c77588b918.
+ " --exclude test_urllib2_localnet test_httplib"))
#:modules ((ice-9 ftw) (ice-9 match)
(guix build utils) (guix build gnu-build-system))
@@ -344,6 +351,9 @@ data types.")
#t))))
(arguments
(substitute-keyword-arguments (package-arguments python-2)
+ ((#:make-flags _)
+ ;; Strip tests exclusions that have to do with Python 2 only.
+ `(list (format #f "TESTOPTS=-j~d" (parallel-job-count))))
((#:phases phases)
`(modify-phases ,phases
;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it