summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-05-05 12:02:03 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-05-05 22:38:18 +0200
commita4ad0a46efcea17390e0f6e3a9568597dab7af80 (patch)
tree2a45971f7b55adcff5f2d3fd3521e0b8379d8fa7
parent1b44a23503809801856e48127332a1fc95c26464 (diff)
gnu: python-graphtools: Fix tests.wip-python-team
* gnu/packages/graph.scm (python-graphtools)[arguments]: Add 'patch-tests phase. Change-Id: I5ffb4321ddd7e33e812bcb1cf67cee069b07b5f8
-rw-r--r--gnu/packages/graph.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 8be720215e..115fe20b52 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -447,6 +447,15 @@ large networks.")
(list
#:phases
'(modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ ;; The warning message has changed in numpy.
+ (substitute* "test/test_data.py"
+ (("\"A sparse matrix was passed, but.*array.\",")
+ "\"Sparse data was passed, but dense data is required. Use '.toarray()' to convert to a dense numpy array.\",")
+ ;; anndata prints a warning that causes the test to fail.
+ (("import warnings" m)
+ (string-append m "\nwarnings.filterwarnings(\"ignore\")")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?