[med-svn] [Git][med-team/pydicom][master] Continue with exclusion of tests.

Andreas Tille (@tille) gitlab at salsa.debian.org
Fri Dec 10 19:01:02 GMT 2021



Andreas Tille pushed to branch master at Debian Med / pydicom


Commits:
889857b5 by Andreas Tille at 2021-12-10T20:00:32+01:00
Continue with exclusion of tests.

- - - - -


1 changed file:

- debian/patches/ignore_tests_downloading_data.patch


Changes:

=====================================
debian/patches/ignore_tests_downloading_data.patch
=====================================
@@ -2146,7 +2146,23 @@ Description: Several data files need to be downloaded which is not possible at p
      filename
 --- a/pydicom/tests/test_cli.py
 +++ b/pydicom/tests/test_cli.py
-@@ -120,6 +120,7 @@ class TestCLIcall:
+@@ -30,6 +30,7 @@ bad_indexes = (
+ )
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ class TestFilespec:
+     @pytest.mark.parametrize("bad_spec", bad_elem_specs)
+     def test_syntax(self, bad_spec):
+@@ -75,6 +76,7 @@ class TestFilespec:
+         assert expected == filespec_parts(filespec)
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ class TestFilespecElementEval:
+     # Load plan once
+     plan, _ = filespec_parser("pydicom::rtplan.dcm")[0]
+@@ -120,6 +122,7 @@ class TestCLIcall:
          out, _ = capsys.readouterr()
          assert out.startswith("usage: pydicom [-h] {")
  
@@ -2154,7 +2170,29 @@ Description: Several data files need to be downloaded which is not possible at p
      def test_codify_command(self, capsys):
          """CLI `codify` command prints correct output"""
  
-@@ -170,6 +171,7 @@ class TestCLIcall:
+@@ -133,11 +136,13 @@ class TestCLIcall:
+         out, _ = capsys.readouterr()
+         assert "add_new((0x0001, 0x0001)" not in out
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_codify_data_element(self, capsys):
+         """CLI `codify` command raises error if not a Dataset"""
+         with pytest.raises(NotImplementedError):
+             main("codify pydicom::rtplan.dcm::RTPlanLabel".split())
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_help(self, capsys):
+         """CLI `help` command gives expected output"""
+         # With subcommand
+@@ -156,6 +161,7 @@ class TestCLIcall:
+         out, _ = capsys.readouterr()
+         assert "Available subcommands:" in out
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_show_command(self, capsys):
+         """CLI `show` command prints correct output"""
+         main("show pydicom::MR_small_RLE.dcm".split())
+@@ -170,6 +176,7 @@ class TestCLIcall:
          out, _ = capsys.readouterr()
          assert "4000" == out.strip()
  
@@ -2162,3 +2200,660 @@ Description: Several data files need to be downloaded which is not possible at p
      def test_show_options(self, capsys):
          """CLI `show` command with options prints correct output"""
          # Quiet option, image file
+--- a/pydicom/tests/test_dataelem.py
++++ b/pydicom/tests/test_dataelem.py
+@@ -402,6 +402,7 @@ class TestDataElement:
+         assert 'PN' == ds[0x00100010].VR
+         assert 'Dionysios=Διονυσιος' == ds[0x00100010].value
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_reading_ds_with_known_tags_with_UN_VR(
+             self, replace_un_with_known_vr):
+         """Known tags with VR UN are correctly read."""
+--- a/pydicom/tests/test_encaps.py
++++ b/pydicom/tests/test_encaps.py
+@@ -472,6 +472,7 @@ class TestGeneratePixelDataFrames:
+         assert next(frames) == b'\x03\x00\x00\x00\x02\x04'
+         pytest.raises(StopIteration, next, frames)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_empty_bot_multi_fragments_per_frame(self):
+         """Test multi-frame where multiple frags per frame and no BOT."""
+         # Regression test for #685
+@@ -541,6 +542,7 @@ class TestGeneratePixelData:
+         with pytest.raises(ValueError, match=msg):
+             next(generate_pixel_data(bytestream))
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_empty_bot_too_few_fragments(self):
+         """Test parsing with too few fragments."""
+         ds = dcmread(JP2K_10FRAME_NOBOT)
+@@ -1135,6 +1137,7 @@ class TestEncapsulateFrame:
+         pytest.raises(StopIteration, next, item_generator)
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ class TestEncapsulate:
+     """Test encaps.encapsulate."""
+     def test_encapsulate_single_fragment_per_frame_no_bot(self):
+@@ -1229,6 +1232,7 @@ class TestEncapsulate:
+             encapsulate([frame_a, frame_b], has_bot=True)
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ class TestEncapsulateExtended:
+     """Tests for encaps.encapsulate_extended."""
+     def test_encapsulate(self):
+--- a/pydicom/tests/test_encoders_pydicom.py
++++ b/pydicom/tests/test_encoders_pydicom.py
+@@ -28,23 +28,23 @@ from pydicom.pixel_data_handlers.util im
+ from pydicom.uid import RLELossless
+ 
+ 
+-# EXPL: Explicit VR Little Endian
+-# RLE: RLE Lossless
+-# 8/8-bit, 1 sample/pixel, 1 frame
+-EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
+-RLE_8_1_1F = get_testdata_file("OBXXXX1A_rle.dcm")
+-# 8/8-bit, 3 sample/pixel, 1 frame
+-EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
+-# 8/8-bit, 3 sample/pixel, 2 frame
+-EXPL_8_3_2F = get_testdata_file("SC_rgb_2frame.dcm")
+-# 16/16-bit, 1 sample/pixel, 1 frame
+-EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
+-# 16/16-bit, 3 sample/pixel, 1 frame
+-EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
+-# 32/32-bit, 1 sample/pixel, 1 frame
+-EXPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
+-# 32/32-bit, 3 sample/pixel, 1 frame
+-EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
++## EXPL: Explicit VR Little Endian
++## RLE: RLE Lossless
++## 8/8-bit, 1 sample/pixel, 1 frame
++#EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
++#RLE_8_1_1F = get_testdata_file("OBXXXX1A_rle.dcm")
++## 8/8-bit, 3 sample/pixel, 1 frame
++#EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
++## 8/8-bit, 3 sample/pixel, 2 frame
++#EXPL_8_3_2F = get_testdata_file("SC_rgb_2frame.dcm")
++## 16/16-bit, 1 sample/pixel, 1 frame
++#EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
++## 16/16-bit, 3 sample/pixel, 1 frame
++#EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
++## 32/32-bit, 1 sample/pixel, 1 frame
++#EXPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
++## 32/32-bit, 3 sample/pixel, 1 frame
++#EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
+ 
+ 
+ # Tests for RLE encoding
+@@ -107,6 +107,7 @@ class TestEncodeRow:
+         assert output == _encode_row(src)
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ @pytest.mark.skipif(not HAVE_NP, reason="Numpy not available")
+ class TestEncodeFrame:
+     """Tests for rle_handler._encode_frame."""
+@@ -139,6 +140,7 @@ class TestEncodeFrame:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_cycle_8bit_3sample(self):
+         """Test an encode/decode cycle for 8-bit 3 sample/pixel."""
+         ds = dcmread(EXPL_8_3_1F)
+@@ -176,6 +178,7 @@ class TestEncodeFrame:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_cycle_16bit_3sample(self):
+         """Test an encode/decode cycle for 16-bit 3 sample/pixel."""
+         ds = dcmread(EXPL_16_3_1F)
+@@ -351,6 +354,7 @@ class TestEncodeFrame:
+ 
+ class TestEncodeSegment:
+     """Tests for rle_handler._encode_segment."""
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.skipif(not HAVE_NP, reason="Numpy not available")
+     def test_one_row(self):
+         """Test encoding data that contains only a single row."""
+@@ -404,6 +408,7 @@ class TestRLEEncodeFrame:
+         with pytest.raises(ValueError, match=msg):
+             rle_encode_frame(arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_encoding_multiple_frames_raises(self):
+         """Test encoding multiple framed pixel data raises exception."""
+         # Note: only works with multi-sample data
+--- a/pydicom/tests/test_filewriter.py
++++ b/pydicom/tests/test_filewriter.py
+@@ -218,6 +218,7 @@ class TestWriteFile:
+         ds = dcmread(fp, force=True)
+         assert ds[0xFFFFFFFF].value == b'123456'
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_write_removes_grouplength(self):
+         ds = dcmread(color_pl_name)
+         assert 0x00080000 in ds
+@@ -1336,6 +1337,7 @@ class TestWriteToStandard:
+         assert ds.get_item(0x300A0006).is_raw  # RT Plan Date
+         assert ds.get_item(0x300A0010).is_raw  # Dose Reference Sequence
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_raw_elements_preserved_explicit_vr(self):
+         """Test writing the dataset preserves raw elements."""
+         ds = dcmread(color_pl_name)
+@@ -1524,6 +1526,7 @@ class TestWriteToStandard:
+         assert ds_expl[(0x0009, 0x10e7)].VR == 'UL'
+         assert ds_expl[(0x0043, 0x1010)].VR == 'US'
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_convert_rgb_from_implicit_to_explicit_vr(self, no_numpy_use):
+         """Test converting an RGB dataset from implicit to explicit VR
+         and vice verse."""
+--- a/pydicom/tests/test_handler_util.py
++++ b/pydicom/tests/test_handler_util.py
+@@ -590,6 +590,7 @@ class TestNumpy_ConvertColourSpace:
+         assert np.allclose(rgb, arr, atol=1)
+         assert rgb.shape == arr.shape
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_rgb_ybr_rgb_multi_frame(self):
+         """Test round trip conversion of multi-framed pixel data."""
+         ds = dcmread(RGB_8_3_2F)
+@@ -836,6 +837,7 @@ class TestNumpy_ModalityLUT:
+         out = apply_modality_lut(arr, ds)
+         assert np.array_equal(arr * 2.5 - 2048, out)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_lut_sequence(self):
+         """Test the LUT Sequence transform."""
+         ds = dcmread(MOD_16_SEQ)
+@@ -863,6 +865,7 @@ class TestNumpy_ModalityLUT:
+         assert 52428 == out[228, 385]
+         assert 58974 == out[291, 385]
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_lut_sequence_zero_entries(self):
+         """Test that 0 entries is interpreted correctly."""
+         # LUTDescriptor[0] of 0 -> 65536, but only 4096 entries so any
+@@ -934,6 +937,7 @@ class TestNumpy_PaletteColor:
+         if os.path.exists(self.n_palette):
+             os.rename(self.n_palette, self.o_palette)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_neither_ds_nor_palette_raises(self):
+         """Test missing `ds` and `palette` raise an exception."""
+         ds = dcmread(PAL_08_256_0_16_1F)
+@@ -941,6 +945,7 @@ class TestNumpy_PaletteColor:
+         with pytest.raises(ValueError, match=msg):
+             apply_color_lut(ds.pixel_array)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_palette_unknown_raises(self):
+         """Test using an unknown `palette` raise an exception."""
+         ds = dcmread(PAL_08_256_0_16_1F)
+@@ -954,6 +959,7 @@ class TestNumpy_PaletteColor:
+         with pytest.raises(ValueError, match=msg):
+             apply_color_lut(ds.pixel_array, palette='1.2.840.10008.1.1')
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_palette_unavailable_raises(self):
+         """Test using a missing `palette` raise an exception."""
+         os.rename(self.o_palette, self.n_palette)
+@@ -999,6 +1005,7 @@ class TestNumpy_PaletteColor:
+         with pytest.raises(ValueError, match=msg):
+             apply_color_lut(ds.pixel_array, ds)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_unequal_lut_length_raises(self):
+         """Test that an unequal LUT lengths raise an exception."""
+         ds = dcmread(PAL_08_256_0_16_1F)
+@@ -1017,6 +1024,7 @@ class TestNumpy_PaletteColor:
+         with pytest.raises(ValueError, match=msg):
+             apply_color_lut(ds.pixel_array, ds)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_uint08_16(self):
+         """Test uint8 Pixel Data with 16-bit LUT entries."""
+         ds = dcmread(PAL_08_200_0_16_1F, force=True)
+@@ -1091,6 +1099,7 @@ class TestNumpy_PaletteColor:
+ 
+         assert (orig == arr).all()
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_uint16_16_segmented_big(self):
+         """Test big endian uint16 Pixel Data with 16-bit LUT entries."""
+         ds = dcmread(PAL_SEG_BE_16_1F)
+--- a/pydicom/tests/test_numpy_pixel_data.py
++++ b/pydicom/tests/test_numpy_pixel_data.py
+@@ -60,91 +60,91 @@ try:
+ except ImportError:
+     NP_HANDLER = None
+ 
+-# Paths to the test datasets
+-# IMPL: Implicit VR Little Endian
+-# EXPL: Explicit VR Little Endian
+-# DEFL: Deflated Explicit VR Little Endian
+-# EXPB: Explicit VR Big Endian
+-# 1/1, 1 sample/pixel, 1 frame
+-EXPL_1_1_1F = get_testdata_file("liver_1frame.dcm")
+-EXPB_1_1_1F = get_testdata_file("liver_expb_1frame.dcm")
+-# 1/1, 1 sample/pixel, 3 frame
+-EXPL_1_1_3F = get_testdata_file("liver.dcm")
+-EXPB_1_1_3F = get_testdata_file("liver_expb.dcm")
+-# 1/1, 3 sample/pixel, 1 frame
++## Paths to the test datasets
++## IMPL: Implicit VR Little Endian
++## EXPL: Explicit VR Little Endian
++## DEFL: Deflated Explicit VR Little Endian
++## EXPB: Explicit VR Big Endian
++## 1/1, 1 sample/pixel, 1 frame
++#EXPL_1_1_1F = get_testdata_file("liver_1frame.dcm")
++#EXPB_1_1_1F = get_testdata_file("liver_expb_1frame.dcm")
++## 1/1, 1 sample/pixel, 3 frame
++#EXPL_1_1_3F = get_testdata_file("liver.dcm")
++#EXPB_1_1_3F = get_testdata_file("liver_expb.dcm")
++## 1/1, 3 sample/pixel, 1 frame
+ EXPL_1_3_1F = None
+ EXPB_1_3_1F = None
+ # 1/1, 3 sample/pixel, XXX frame
+ EXPL_1_3_XF = None
+ EXPB_1_3_XF = None
+-# 8/8, 1 sample/pixel, 1 frame
+-DEFL_8_1_1F = get_testdata_file("image_dfl.dcm")
+-EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
+-EXPB_8_1_1F = get_testdata_file("OBXXXX1A_expb.dcm")
+-# 8/8, 1 sample/pixel, 2 frame
+-EXPL_8_1_2F = get_testdata_file("OBXXXX1A_2frame.dcm")
+-EXPB_8_1_2F = get_testdata_file("OBXXXX1A_expb_2frame.dcm")
+-# 8/8, 3 sample/pixel, 1 frame
+-EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
+-EXPB_8_3_1F = get_testdata_file("SC_rgb_expb.dcm")
+-# 8/8, 3 samples/pixel, 1 frame, 3 x 3
+-EXPL_8_3_1F_ODD = get_testdata_file('SC_rgb_small_odd.dcm')
+-# 8/8, 3 sample/pixel, 1 frame, YBR_FULL_422
+-EXPL_8_3_1F_YBR422 = get_testdata_file('SC_ybr_full_422_uncompressed.dcm')
+-# 8/8, 3 sample/pixel, 1 frame, YBR_FULL
+-EXPL_8_3_1F_YBR = get_testdata_file('SC_ybr_full_uncompressed.dcm')
+-# 8/8, 3 sample/pixel, 2 frame
+-EXPL_8_3_2F = get_testdata_file("SC_rgb_2frame.dcm")
+-EXPB_8_3_2F = get_testdata_file("SC_rgb_expb_2frame.dcm")
+-# 16/16, 1 sample/pixel, 1 frame
+-IMPL_16_1_1F = get_testdata_file("MR_small_implicit.dcm")
+-EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
+-EXPB_16_1_1F = get_testdata_file("MR_small_expb.dcm")
+-# Pixel Data with 128 bytes trailing padding
+-EXPL_16_1_1F_PAD = get_testdata_file("MR_small_padded.dcm")
+-# 16/12, 1 sample/pixel, 10 frame
+-EXPL_16_1_10F = get_testdata_file("emri_small.dcm")
+-EXPB_16_1_10F = get_testdata_file("emri_small_big_endian.dcm")
+-# 16/16, 3 sample/pixel, 1 frame
+-EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
+-EXPB_16_3_1F = get_testdata_file("SC_rgb_expb_16bit.dcm")
+-# 16/16, 3 sample/pixel, 2 frame
+-EXPL_16_3_2F = get_testdata_file("SC_rgb_16bit_2frame.dcm")
+-EXPB_16_3_2F = get_testdata_file("SC_rgb_expb_16bit_2frame.dcm")
+-# 32/32, 1 sample/pixel, 1 frame
+-IMPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
+-EXPB_32_1_1F = get_testdata_file("rtdose_expb_1frame.dcm")
+-# 32/32, 1 sample/pixel, 15 frame
+-IMPL_32_1_15F = get_testdata_file("rtdose.dcm")
+-EXPB_32_1_15F = get_testdata_file("rtdose_expb.dcm")
+-# 32/32, 3 sample/pixel, 1 frame
+-EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
+-EXPB_32_3_1F = get_testdata_file("SC_rgb_expb_32bit.dcm")
+-# 32/32, 3 sample/pixel, 2 frame
+-EXPL_32_3_2F = get_testdata_file("SC_rgb_32bit_2frame.dcm")
+-EXPB_32_3_2F = get_testdata_file("SC_rgb_expb_32bit_2frame.dcm")
+-
+-# Transfer syntaxes supported by other handlers
+-# JPEG Baseline (Process 1)
+-JPEG_BASELINE_1 = get_testdata_file("SC_rgb_jpeg_dcmtk.dcm")
+-# JPEG Baseline (Process 2 and 4)
+-JPEG_EXTENDED_2 = get_testdata_file("JPEG-lossy.dcm")
++## 8/8, 1 sample/pixel, 1 frame
++#DEFL_8_1_1F = get_testdata_file("image_dfl.dcm")
++#EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
++#EXPB_8_1_1F = get_testdata_file("OBXXXX1A_expb.dcm")
++## 8/8, 1 sample/pixel, 2 frame
++#EXPL_8_1_2F = get_testdata_file("OBXXXX1A_2frame.dcm")
++#EXPB_8_1_2F = get_testdata_file("OBXXXX1A_expb_2frame.dcm")
++## 8/8, 3 sample/pixel, 1 frame
++#EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
++#EXPB_8_3_1F = get_testdata_file("SC_rgb_expb.dcm")
++## 8/8, 3 samples/pixel, 1 frame, 3 x 3
++#EXPL_8_3_1F_ODD = get_testdata_file('SC_rgb_small_odd.dcm')
++## 8/8, 3 sample/pixel, 1 frame, YBR_FULL_422
++#EXPL_8_3_1F_YBR422 = get_testdata_file('SC_ybr_full_422_uncompressed.dcm')
++## 8/8, 3 sample/pixel, 1 frame, YBR_FULL
++#EXPL_8_3_1F_YBR = get_testdata_file('SC_ybr_full_uncompressed.dcm')
++## 8/8, 3 sample/pixel, 2 frame
++#EXPL_8_3_2F = get_testdata_file("SC_rgb_2frame.dcm")
++#EXPB_8_3_2F = get_testdata_file("SC_rgb_expb_2frame.dcm")
++## 16/16, 1 sample/pixel, 1 frame
++#IMPL_16_1_1F = get_testdata_file("MR_small_implicit.dcm")
++#EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
++#EXPB_16_1_1F = get_testdata_file("MR_small_expb.dcm")
++## Pixel Data with 128 bytes trailing padding
++#EXPL_16_1_1F_PAD = get_testdata_file("MR_small_padded.dcm")
++## 16/12, 1 sample/pixel, 10 frame
++#EXPL_16_1_10F = get_testdata_file("emri_small.dcm")
++#EXPB_16_1_10F = get_testdata_file("emri_small_big_endian.dcm")
++## 16/16, 3 sample/pixel, 1 frame
++#EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
++#EXPB_16_3_1F = get_testdata_file("SC_rgb_expb_16bit.dcm")
++## 16/16, 3 sample/pixel, 2 frame
++#EXPL_16_3_2F = get_testdata_file("SC_rgb_16bit_2frame.dcm")
++#EXPB_16_3_2F = get_testdata_file("SC_rgb_expb_16bit_2frame.dcm")
++## 32/32, 1 sample/pixel, 1 frame
++#IMPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
++#EXPB_32_1_1F = get_testdata_file("rtdose_expb_1frame.dcm")
++## 32/32, 1 sample/pixel, 15 frame
++#IMPL_32_1_15F = get_testdata_file("rtdose.dcm")
++#EXPB_32_1_15F = get_testdata_file("rtdose_expb.dcm")
++## 32/32, 3 sample/pixel, 1 frame
++#EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
++#EXPB_32_3_1F = get_testdata_file("SC_rgb_expb_32bit.dcm")
++## 32/32, 3 sample/pixel, 2 frame
++#EXPL_32_3_2F = get_testdata_file("SC_rgb_32bit_2frame.dcm")
++#EXPB_32_3_2F = get_testdata_file("SC_rgb_expb_32bit_2frame.dcm")
++#
++## Transfer syntaxes supported by other handlers
++## JPEG Baseline (Process 1)
++#JPEG_BASELINE_1 = get_testdata_file("SC_rgb_jpeg_dcmtk.dcm")
++## JPEG Baseline (Process 2 and 4)
++#JPEG_EXTENDED_2 = get_testdata_file("JPEG-lossy.dcm")
+ # JPEG Lossless (Process 14)
+ JPEG_LOSSLESS_14 = None
+-# JPEG Lossless (Process 14, Selection Value 1)
+-JPEG_LOSSLESS_14_1 = get_testdata_file("SC_rgb_jpeg_gdcm.dcm")
+-# JPEG-LS Lossless
+-JPEG_LS_LOSSLESS = get_testdata_file("MR_small_jpeg_ls_lossless.dcm")
++## JPEG Lossless (Process 14, Selection Value 1)
++#JPEG_LOSSLESS_14_1 = get_testdata_file("SC_rgb_jpeg_gdcm.dcm")
++## JPEG-LS Lossless
++#JPEG_LS_LOSSLESS = get_testdata_file("MR_small_jpeg_ls_lossless.dcm")
+ # JPEG-LS Lossy
+ JPEG_LS_LOSSY = None
+-# JPEG2k Lossless
+-JPEG_2K_LOSSLESS = get_testdata_file("emri_small_jpeg_2k_lossless.dcm")
+-# JPEG2k
+-JPEG_2K = get_testdata_file("JPEG2000.dcm")
+-# RLE Lossless
+-RLE = get_testdata_file("MR_small_RLE.dcm")
+-# No Image Pixel module
+-NO_PIXEL = get_testdata_file("rtplan.dcm")
++## JPEG2k Lossless
++#JPEG_2K_LOSSLESS = get_testdata_file("emri_small_jpeg_2k_lossless.dcm")
++## JPEG2k
++#JPEG_2K = get_testdata_file("JPEG2000.dcm")
++## RLE Lossless
++#RLE = get_testdata_file("MR_small_RLE.dcm")
++## No Image Pixel module
++#NO_PIXEL = get_testdata_file("rtplan.dcm")
+ 
+ 
+ # Transfer Syntaxes (non-retired + Explicit VR Big Endian)
+@@ -166,15 +166,15 @@ def test_unsupported_syntaxes():
+ 
+ 
+ REFERENCE_DATA_UNSUPPORTED = [
+-    (JPEG_BASELINE_1, ('1.2.840.10008.1.2.4.50', 'Lestrade^G')),
+-    (JPEG_EXTENDED_2, ('1.2.840.10008.1.2.4.51', 'CompressedSamples^NM1')),
+-    # (JPEG_LOSSLESS_14, ('1.2.840.10008.1.2.4.57')),  # No dataset available
+-    (JPEG_LOSSLESS_14_1, ('1.2.840.10008.1.2.4.70', 'Lestrade^G')),
+-    (JPEG_LS_LOSSLESS, ('1.2.840.10008.1.2.4.80', 'CompressedSamples^MR1')),
+-    # (JPEG_LS_LOSSY, ('1.2.840.10008.1.2.4.81')),  # No dataset available
+-    (JPEG_2K_LOSSLESS, ('1.2.840.10008.1.2.4.90', '')),
+-    (JPEG_2K, ('1.2.840.10008.1.2.4.91', 'CompressedSamples^NM1')),
+-    (RLE, ('1.2.840.10008.1.2.5', 'CompressedSamples^MR1')),
++#    (JPEG_BASELINE_1, ('1.2.840.10008.1.2.4.50', 'Lestrade^G')),
++#    (JPEG_EXTENDED_2, ('1.2.840.10008.1.2.4.51', 'CompressedSamples^NM1')),
++#    # (JPEG_LOSSLESS_14, ('1.2.840.10008.1.2.4.57')),  # No dataset available
++#    (JPEG_LOSSLESS_14_1, ('1.2.840.10008.1.2.4.70', 'Lestrade^G')),
++#    (JPEG_LS_LOSSLESS, ('1.2.840.10008.1.2.4.80', 'CompressedSamples^MR1')),
++#    # (JPEG_LS_LOSSY, ('1.2.840.10008.1.2.4.81')),  # No dataset available
++#    (JPEG_2K_LOSSLESS, ('1.2.840.10008.1.2.4.90', '')),
++#    (JPEG_2K, ('1.2.840.10008.1.2.4.91', 'CompressedSamples^NM1')),
++#    (RLE, ('1.2.840.10008.1.2.5', 'CompressedSamples^MR1')),
+ ]
+ 
+ SUPPORTED_HANDLER_NAMES = (
+@@ -359,6 +359,7 @@ class TestNumpy_NoNumpyHandler:
+         assert 'CompressedSamples^MR1' == ds.PatientName
+         assert 8192 == len(ds.PixelData)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.parametrize("fpath,data", REFERENCE_DATA_UNSUPPORTED)
+     def test_can_access_unsupported_dataset(self, fpath, data):
+         """Test can read and access elements in unsupported datasets."""
+@@ -377,42 +378,42 @@ class TestNumpy_NoNumpyHandler:
+ 
+ # Numpy and the numpy handler are available
+ MATCHING_DATASETS = [
+-    (EXPL_1_1_1F, EXPB_1_1_1F),
+-    (EXPL_1_1_3F, EXPB_1_1_3F),
+-    (EXPL_8_1_1F, EXPB_8_1_1F),
+-    (EXPL_8_1_2F, EXPB_8_1_2F),
+-    (EXPL_8_3_1F, EXPB_8_3_1F),
+-    (EXPL_8_3_2F, EXPB_8_3_2F),
+-    (EXPL_16_1_1F, EXPB_16_1_1F),
+-    (EXPL_16_1_10F, EXPB_16_1_10F),
+-    (EXPL_16_3_1F, EXPB_16_3_1F),
+-    (EXPL_16_3_2F, EXPB_16_3_2F),
+-    (IMPL_32_1_1F, EXPB_32_1_1F),
+-    (IMPL_32_1_15F, EXPB_32_1_15F),
+-    (EXPL_32_3_1F, EXPB_32_3_1F),
+-    (EXPL_32_3_2F, EXPB_32_3_2F)
++#    (EXPL_1_1_1F, EXPB_1_1_1F),
++#    (EXPL_1_1_3F, EXPB_1_1_3F),
++#    (EXPL_8_1_1F, EXPB_8_1_1F),
++#    (EXPL_8_1_2F, EXPB_8_1_2F),
++#    (EXPL_8_3_1F, EXPB_8_3_1F),
++#    (EXPL_8_3_2F, EXPB_8_3_2F),
++#    (EXPL_16_1_1F, EXPB_16_1_1F),
++#    (EXPL_16_1_10F, EXPB_16_1_10F),
++#    (EXPL_16_3_1F, EXPB_16_3_1F),
++#    (EXPL_16_3_2F, EXPB_16_3_2F),
++#    (IMPL_32_1_1F, EXPB_32_1_1F),
++#    (IMPL_32_1_15F, EXPB_32_1_15F),
++#    (EXPL_32_3_1F, EXPB_32_3_1F),
++#    (EXPL_32_3_2F, EXPB_32_3_2F)
+ ]
+ 
+ EXPL = ExplicitVRLittleEndian
+ IMPL = ImplicitVRLittleEndian
+ REFERENCE_DATA_LITTLE = [
+-    # fpath, (syntax, bits, nr samples, pixel repr, nr frames, shape, dtype)
+-    (EXPL_1_1_1F, (EXPL, 1, 1, 0, 1, (512, 512), 'uint8')),
+-    (EXPL_1_1_3F, (EXPL, 1, 1, 0, 3, (3, 512, 512), 'uint8')),
+-    (EXPL_8_1_1F, (EXPL, 8, 1, 0, 1, (600, 800), 'uint8')),
+-    (EXPL_8_3_1F_ODD, (EXPL, 8, 3, 0, 1, (3, 3, 3), 'uint8')),
+-    (EXPL_8_3_1F_YBR422, (EXPL, 8, 3, 0, 1, (100, 100, 3), 'uint8')),
+-    (EXPL_8_1_2F, (EXPL, 8, 1, 0, 2, (2, 600, 800), 'uint8')),
+-    (EXPL_8_3_1F, (EXPL, 8, 3, 0, 1, (100, 100, 3), 'uint8')),
+-    (EXPL_8_3_2F, (EXPL, 8, 3, 0, 2, (2, 100, 100, 3), 'uint8')),
+-    (EXPL_16_1_1F, (EXPL, 16, 1, 1, 1, (64, 64), 'int16')),
+-    (EXPL_16_1_10F, (EXPL, 16, 1, 0, 10, (10, 64, 64), 'uint16')),
+-    (EXPL_16_3_1F, (EXPL, 16, 3, 0, 1, (100, 100, 3), 'uint16')),
+-    (EXPL_16_3_2F, (EXPL, 16, 3, 0, 2, (2, 100, 100, 3), 'uint16')),
+-    (IMPL_32_1_1F, (IMPL, 32, 1, 0, 1, (10, 10), 'uint32')),
+-    (IMPL_32_1_15F, (IMPL, 32, 1, 0, 15, (15, 10, 10), 'uint32')),
+-    (EXPL_32_3_1F, (EXPL, 32, 3, 0, 1, (100, 100, 3), 'uint32')),
+-    (EXPL_32_3_2F, (EXPL, 32, 3, 0, 2, (2, 100, 100, 3), 'uint32')),
++#    # fpath, (syntax, bits, nr samples, pixel repr, nr frames, shape, dtype)
++#    (EXPL_1_1_1F, (EXPL, 1, 1, 0, 1, (512, 512), 'uint8')),
++#    (EXPL_1_1_3F, (EXPL, 1, 1, 0, 3, (3, 512, 512), 'uint8')),
++#    (EXPL_8_1_1F, (EXPL, 8, 1, 0, 1, (600, 800), 'uint8')),
++#    (EXPL_8_3_1F_ODD, (EXPL, 8, 3, 0, 1, (3, 3, 3), 'uint8')),
++#    (EXPL_8_3_1F_YBR422, (EXPL, 8, 3, 0, 1, (100, 100, 3), 'uint8')),
++#    (EXPL_8_1_2F, (EXPL, 8, 1, 0, 2, (2, 600, 800), 'uint8')),
++#    (EXPL_8_3_1F, (EXPL, 8, 3, 0, 1, (100, 100, 3), 'uint8')),
++#    (EXPL_8_3_2F, (EXPL, 8, 3, 0, 2, (2, 100, 100, 3), 'uint8')),
++#    (EXPL_16_1_1F, (EXPL, 16, 1, 1, 1, (64, 64), 'int16')),
++#    (EXPL_16_1_10F, (EXPL, 16, 1, 0, 10, (10, 64, 64), 'uint16')),
++#    (EXPL_16_3_1F, (EXPL, 16, 3, 0, 1, (100, 100, 3), 'uint16')),
++#    (EXPL_16_3_2F, (EXPL, 16, 3, 0, 2, (2, 100, 100, 3), 'uint16')),
++#    (IMPL_32_1_1F, (IMPL, 32, 1, 0, 1, (10, 10), 'uint32')),
++#    (IMPL_32_1_15F, (IMPL, 32, 1, 0, 15, (15, 10, 10), 'uint32')),
++#    (EXPL_32_3_1F, (EXPL, 32, 3, 0, 1, (100, 100, 3), 'uint32')),
++#    (EXPL_32_3_2F, (EXPL, 32, 3, 0, 2, (2, 100, 100, 3), 'uint32')),
+ ]
+ 
+ 
+@@ -482,6 +483,7 @@ class TestNumpy_NumpyHandler:
+         with pytest.raises(AttributeError, match=msg):
+             ds.pixel_array
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.parametrize("fpath, data", REFERENCE_DATA_UNSUPPORTED)
+     def test_can_access_unsupported_dataset(self, fpath, data):
+         """Test can read and access elements in unsupported datasets."""
+@@ -489,6 +491,7 @@ class TestNumpy_NumpyHandler:
+         assert data[0] == ds.file_meta.TransferSyntaxUID
+         assert data[1] == ds.PatientName
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_pixel_array_8bit_un_signed(self):
+         """Test pixel_array for 8-bit unsigned -> signed data."""
+         ds = dcmread(EXPL_8_1_1F)
+@@ -504,6 +507,7 @@ class TestNumpy_NumpyHandler:
+         assert (1, -10, 1) == tuple(arr[300, 491:494])
+         assert 0 == arr[-1].min() == arr[-1].max()
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.parametrize("handler_name", SUPPORTED_HANDLER_NAMES)
+     def test_decompress_using_handler(self, handler_name):
+         """Test different possibilities for the numpy handler name."""
+@@ -514,6 +518,7 @@ class TestNumpy_NumpyHandler:
+         assert (1, 246, 1) == tuple(ds.pixel_array[300, 491:494])
+         assert 0 == ds.pixel_array[-1].min() == ds.pixel_array[-1].max()
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_pixel_array_16bit_un_signed(self):
+         """Test pixel_array for 16-bit unsigned -> signed."""
+         ds = dcmread(EXPL_16_3_1F)
+@@ -543,6 +548,7 @@ class TestNumpy_NumpyHandler:
+         assert -2139062144 == arr[50, :, 0].min() == arr[50, :, 0].max()
+ 
+     # Endian independent datasets
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_8bit_1sample_1frame(self):
+         """Test pixel_array for 8-bit, 1 sample/pixel, 1 frame."""
+         # Check supported syntaxes
+@@ -640,6 +646,7 @@ class TestNumpy_NumpyHandler:
+             assert (192, 192, 192) == tuple(arr[85, 50, :])
+             assert (255, 255, 255) == tuple(arr[95, 50, :])
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_8bit_3sample_2frame(self):
+         """Test pixel_array for 8-bit, 3 sample/pixel, 2 frame."""
+         # Check supported syntaxes
+@@ -666,6 +673,7 @@ class TestNumpy_NumpyHandler:
+             assert np.array_equal((2 ** ds.BitsAllocated - 1) - arr[1], arr[0])
+ 
+     # Little endian datasets
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.parametrize('fpath, data', REFERENCE_DATA_LITTLE)
+     def test_properties(self, fpath, data):
+         """Test dataset and pixel array properties are as expected."""
+--- a/pydicom/tests/test_encoders.py
++++ b/pydicom/tests/test_encoders.py
+@@ -270,6 +270,7 @@ class TestEncoder:
+         assert 'foo - requires bar' == s[0]
+ 
+ 
++ at pytest.mark.skip("When building a Debian package we can not download anything")
+ @pytest.mark.skipif(not HAVE_NP, reason="Numpy not available")
+ class TestEncoder_Encode:
+     """Tests for Encoder.encode() and related methods."""
+--- a/pydicom/tests/test_encoders_gdcm.py
++++ b/pydicom/tests/test_encoders_gdcm.py
+@@ -21,13 +21,13 @@ except ImportError:
+     HAVE_GDCM = False
+     GDCM_VERSION = [0, 0, 0]
+ 
+-# EXPL: Explicit VR Little Endian
+-EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
+-EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
+-EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
+-EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
+-EXPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
+-EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
++## EXPL: Explicit VR Little Endian
++#EXPL_8_1_1F = get_testdata_file("OBXXXX1A.dcm")
++#EXPL_8_3_1F = get_testdata_file("SC_rgb.dcm")
++#EXPL_16_1_1F = get_testdata_file("MR_small.dcm")
++#EXPL_16_3_1F = get_testdata_file("SC_rgb_16bit.dcm")
++#EXPL_32_1_1F = get_testdata_file("rtdose_1frame.dcm")
++#EXPL_32_3_1F = get_testdata_file("SC_rgb_32bit.dcm")
+ 
+ 
+ @pytest.mark.skipif(not HAVE_GDCM, reason='GDCM plugin is not available')
+@@ -73,6 +73,7 @@ class TestRLELossless:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_cycle_i16_1s_1f(self):
+         """Test an encode/decode cycle for 16-bit 1 sample/pixel."""
+         ds = dcmread(EXPL_16_1_1F)
+@@ -93,6 +94,7 @@ class TestRLELossless:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_cycle_u16_3s_1f(self):
+         """Test an encode/decode cycle for 16-bit 3 sample/pixel."""
+         ds = dcmread(EXPL_16_3_1F)
+@@ -115,6 +117,7 @@ class TestRLELossless:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_cycle_u32_1s_1f(self):
+         """Test an encode/decode cycle for 32-bit 1 sample/pixel."""
+         ds = dcmread(EXPL_32_1_1F)
+@@ -135,6 +138,7 @@ class TestRLELossless:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.skipif(GDCM_VERSION < [3, 1, 0], reason="GDCM bug")
+     def test_cycle_u32_3s_1f(self):
+         """Test an encode/decode cycle for 32-bit 3 sample/pixel."""
+@@ -159,6 +163,7 @@ class TestRLELossless:
+ 
+         assert np.array_equal(ref, arr)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     @pytest.mark.skipif(GDCM_VERSION >= [3, 1, 0], reason="GDCM bug fixed")
+     def test_cycle_u32_3s_1f_raises(self):
+         """Test that 32-bit, 3 sample/px data raises exception."""
+@@ -176,6 +181,7 @@ class TestRLELossless:
+         with pytest.raises(RuntimeError, match=msg):
+             gdcm_rle_encode(ds.PixelData, **kwargs)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_invalid_byteorder_raises(self):
+         """Test that big endian source raises exception."""
+         ds = dcmread(EXPL_8_1_1F)
+@@ -191,6 +197,7 @@ class TestRLELossless:
+                 ds.PixelData, encoding_plugin='gdcm', byteorder='>', **kwargs
+             )
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_above_32bit_raises(self):
+         """Test that > 32-bit Bits Allocated raises exception."""
+         ds = dcmread(EXPL_8_1_1F)
+@@ -206,6 +213,7 @@ class TestRLELossless:
+         with pytest.raises(RuntimeError, match=msg):
+             enc.encode(ds.PixelData, encoding_plugin='gdcm', **kwargs)
+ 
++    @pytest.mark.skip("When building a Debian package we can not download anything")
+     def test_encoding_failure_raises(self):
+         """Test that a encoding failure result raises an exception"""
+         kwargs = {



View it on GitLab: https://salsa.debian.org/med-team/pydicom/-/commit/889857b5c98b15cfe76f5cf4ba4a0940db44aa98

-- 
View it on GitLab: https://salsa.debian.org/med-team/pydicom/-/commit/889857b5c98b15cfe76f5cf4ba4a0940db44aa98
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211210/e26e357d/attachment-0001.htm>


More information about the debian-med-commit mailing list