File: skip-i386-incapable-tests.patch

package info (click to toggle)
pydicom 2.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,660 kB
  • sloc: python: 129,340; makefile: 198; sh: 121
file content (32 lines) | stat: -rw-r--r-- 1,134 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
Description: skip tests impoosible to run on 32-bit architectures.
 This patch prevents running into the following errors by stopping the
 test just before the error condition:
 .
        >       assert 36**6 + 1 == len(fs)
        E       OverflowError: cannot fit 'int' into an index-sized integer
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/1103137
Forwarded: no
Last-Update: 2025-04-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pydicom.orig/pydicom/tests/test_fileset.py
+++ pydicom/pydicom/tests/test_fileset.py
@@ -2246,6 +2246,8 @@
 
         FileSet.__len__ = my_len
         fs = FileSet(ds)
+        if sys.maxsize <= 2 ** 32 + 1:
+            return
         assert 36**6 + 1 == len(fs)
         msg = (
             r"pydicom doesn't support writing File-sets with more than "
@@ -2577,6 +2579,8 @@
 
         FileSet.__len__ = my_len
         fs = FileSet(tiny)
+        if sys.maxsize <= 2 ** 32 + 1:
+            return
         assert 36**6 + 1 == len(fs)
         msg = (
             r"pydicom doesn't support writing File-sets with more than "