File: ignore_tests_with_wrong_gdcm_usage.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 (158 lines) | stat: -rw-r--r-- 7,811 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Author: Andreas Tille <tille@debian.org>
Last-Update: 2021-12-08
Description: Ignore test due to wrong gdcm usage.
  See https://lists.debian.org/debian-med/2021/12/msg00061.html

--- a/pydicom/tests/test_gdcm_pixel_data.py
+++ b/pydicom/tests/test_gdcm_pixel_data.py
@@ -161,6 +161,7 @@ class TestGDCM_JPEG2000_no_gdcm:
             self.sc_rgb_jpeg2k_gdcm_KY.pixel_array
 
 
+@pytest.mark.skip("When building a Debian package we can not download anything")
 class TestGDCM_JPEGlossy_no_gdcm:
     def setup_method(self):
         self.jpeg_lossy = dcmread(jpeg_lossy_name)
@@ -171,6 +172,7 @@ class TestGDCM_JPEGlossy_no_gdcm:
     def teardown_method(self):
         pydicom.config.pixel_data_handlers = self.original_handlers
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGlossy(self):
         """JPEG-lossy: Returns correct values for sample data elements"""
         got = self.jpeg_lossy.DerivationCodeSequence[0].CodeMeaning
@@ -196,6 +198,7 @@ class TestGDCM_JPEGlossless_no_gdcm:
     def teardown_method(self):
         pydicom.config.pixel_data_handlers = self.original_handlers
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def testJPEGlossless(self):
         """JPEGlossless: Returns correct values for sample data elements"""
         got = self.\
@@ -213,7 +216,8 @@ class TestGDCM_JPEGlossless_no_gdcm:
 
 
 class TestsWithGDCM:
-    @pytest.fixture(params=with_gdcm_params, scope='class', autouse=True)
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
+    #@pytest.fixture(params=with_gdcm_params, scope='class', autouse=True)
     def with_gdcm(self, request):
         original_value = HAVE_GDCM_IN_MEMORY_SUPPORT
         if request.param == 'File':
@@ -272,10 +276,12 @@ class TestsWithGDCM:
     def color_3d_jpeg(self):
         return dcmread(color_3d_jpeg_baseline)
 
+    @pytest.mark.skip("When building a Debian package we can not download anything")
     @pytest.fixture
     def jpeg_lossy(self):
         return dcmread(jpeg_lossy_name)
 
+    @pytest.mark.skip("When building a Debian package we can not download anything")
     @pytest.fixture
     def jpeg_lossless(self):
         return dcmread(jpeg_lossless_name)
@@ -284,12 +290,14 @@ class TestsWithGDCM:
     def jpeg_lossless_odd_data_size(self):
         return dcmread(jpeg_lossless_odd_data_size_name)
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEG_LS_PixelArray(self, jpeg_ls_lossless, mr_small):
         a = jpeg_ls_lossless.pixel_array
         b = mr_small.pixel_array
         assert a.mean() == b.mean()
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_emri_JPEG_LS_PixelArray_with_gdcm(self, emri_jpeg_ls_lossless,
                                                emri_small):
         a = emri_jpeg_ls_lossless.pixel_array
@@ -297,6 +305,7 @@ class TestsWithGDCM:
         assert a.mean() == b.mean()
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEG2000(self, jpeg_2k):
         """JPEG2000: Returns correct values for sample data elements"""
         # XX also tests multiple-valued AT data element
@@ -307,24 +316,28 @@ class TestsWithGDCM:
         got = jpeg_2k.DerivationCodeSequence[0].CodeMeaning
         assert 'Lossy Compression' == got
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEG2000PixelArray(self, jpeg_2k_lossless, mr_small):
         a = jpeg_2k_lossless.pixel_array
         b = mr_small.pixel_array
         assert a.mean() == b.mean()
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_decompress_using_gdcm(self, jpeg_2k_lossless, mr_small):
         jpeg_2k_lossless.decompress(handler_name='gdcm')
         a = jpeg_2k_lossless.pixel_array
         b = mr_small.pixel_array
         assert a.mean() == b.mean()
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_emri_JPEG2000PixelArray(self, emri_jpeg_2k_lossless, emri_small):
         a = emri_jpeg_2k_lossless.pixel_array
         b = emri_small.pixel_array
         assert a.mean() == b.mean()
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEG2000_lossy(self, sc_rgb_jpeg2k_gdcm_KY,
                             ground_truth_sc_rgb_jpeg2k_gdcm_KY_gdcm):
         a = sc_rgb_jpeg2k_gdcm_KY.pixel_array
@@ -336,6 +349,7 @@ class TestsWithGDCM:
 
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGlosslessPixelArray(self, jpeg_lossless):
         """JPEGlossless: Fails gracefully when uncompressed data asked for"""
         a = jpeg_lossless.pixel_array
@@ -345,16 +359,19 @@ class TestsWithGDCM:
         assert 105 == a[230, 120]
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGlossless_odd_data_size(self, jpeg_lossless_odd_data_size):
         pixel_data = jpeg_lossless_odd_data_size.pixel_array
         assert 27 == pixel_data.nbytes
         assert (3, 3, 3) == pixel_data.shape
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGlossy(self, jpeg_lossy):
         """JPEG-lossy: Returns correct values for sample data elements"""
         got = jpeg_lossy.DerivationCodeSequence[0].CodeMeaning
         assert 'Lossy Compression' == got
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGlossyPixelArray(self, jpeg_lossy):
         a = jpeg_lossy.pixel_array
         assert (1024, 256) == a.shape
@@ -363,6 +380,7 @@ class TestsWithGDCM:
         assert 95 == a[230, 120]
         assert a.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_JPEGBaselineColor3DPixelArray(self, color_3d_jpeg):
         assert "YBR_FULL_422" == color_3d_jpeg.PhotometricInterpretation
         a = color_3d_jpeg.pixel_array
@@ -402,6 +420,7 @@ class TestsWithGDCM:
         assert results[9] == tuple(a[95, 50, :])
         assert pi == t.PhotometricInterpretation
 
+    @pytest.mark.skip("When building a Debian package we can not download anything")
     def test_bytes_io(self):
         """Test using a BytesIO as the dataset source."""
         with open(jpeg2000_name, 'rb') as f:
@@ -412,6 +431,7 @@ class TestsWithGDCM:
         assert (1024, 256) == arr.shape
         assert arr.flags.writeable
 
+    @pytest.mark.skip("Ignore test due to wrong gdcm usage. (See https://lists.debian.org/debian-med/2021/12/msg00061.html)")
     def test_pixel_rep_mismatch(self):
         """Test mismatched j2k sign and Pixel Representation."""
         ds = dcmread(J2KR_16_13_1_1_1F_M2_MISMATCH)