File: test-all-overlaps-both-32bit.patch

package info (click to toggle)
python-ncls 0.0.70%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 412 kB
  • sloc: ansic: 2,246; python: 197; sh: 18; makefile: 8
file content (37 lines) | stat: -rw-r--r-- 1,264 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
26
27
28
29
30
31
32
33
34
35
36
37
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 1 Dec 2025 09:30:13 +0000
Subject: Fix test_all_overlaps_both on architectures where int64!=long

As seen in e.g.
https://buildd.debian.org/status/fetch.php?pkg=python-ncls&arch=i386&ver=0.0.70%2Bds-1&stamp=1764516415&raw=0.

Forwarded: https://github.com/pyranges/ncls/pull/67
Last-Update: 2025-12-01
---
 tests/test_1024.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/test_1024.py b/tests/test_1024.py
index a2bdb8a..0b48469 100644
--- a/tests/test_1024.py
+++ b/tests/test_1024.py
@@ -12,15 +12,15 @@ def test_all_overlaps_both():
 
     ncls = NCLS(starts, ends, ids)
 
-    starts2 = np.arange(0, 2048, 2)
-    ends2 = np.arange(1, 2048, 2)
+    starts2 = np.arange(0, 2048, 2, dtype=np.int64)
+    ends2 = np.arange(1, 2048, 2, dtype=np.int64)
 
     result = ncls.all_overlaps_both(starts2, ends2, starts2)
     assert len(result[0]) == 1024
     print(result[0])
 
-    starts2 = np.arange(0, 2 * 2048, 2)
-    ends2 = np.arange(1, 2 * 2048, 2)
+    starts2 = np.arange(0, 2 * 2048, 2, dtype=np.int64)
+    ends2 = np.arange(1, 2 * 2048, 2, dtype=np.int64)
     # ncls2 = NCLS(starts2, ends2, starts2)
 
     result = ncls.all_overlaps_both(starts2, ends2, starts2)