File: skip-cupy-tests.patch

package info (click to toggle)
python-anndata 0.12.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,704 kB
  • sloc: python: 19,721; makefile: 22; sh: 14
file content (25 lines) | stat: -rw-r--r-- 605 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Author: Diane Trout <diane@ghic.org>
Description: Skip tests for cupy which we don't have in Debian
Forwarded: no

--- a/tests/test_concatenate.py
+++ b/tests/test_concatenate.py
@@ -1623,6 +1623,7 @@
 @pytest.mark.gpu
 def test_error_on_mixed_device():
     """https://github.com/scverse/anndata/issues/1083"""
+    pytest.importorskip("cupy")
     import cupy
     import cupyx.scipy.sparse as cupy_sparse
 
--- a/tests/test_gpu.py
+++ b/tests/test_gpu.py
@@ -5,6 +5,8 @@ from scipy import sparse
 
 from anndata import AnnData, Raw
 
+pytest.importorskip("cupy")
+
 
 @pytest.mark.gpu
 def test_gpu():