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)
