profile
viewpoint

Ask questionstest_handler_util fails with numpy 1.19

=================================== FAILURES ===================================
_____________ TestNumpy_PaletteColor.test_invalid_bit_depth_raises _____________

self = <pydicom.tests.test_handler_util.TestNumpy_PaletteColor object at 0x7f017d5c1df0>

    def test_invalid_bit_depth_raises(self):
        """Test that an invalid bit depth raises an exception."""
        ds = dcmread(PAL_08_256_0_16_1F)
        ds.RedPaletteColorLookupTableDescriptor[2] = 15
        msg = (
            r'data type "uint15" not understood'
        )
        with pytest.raises(TypeError, match=msg):
>           apply_color_lut(ds.pixel_array, ds)

pydicom/tests/test_handler_util.py:951: 
...
self = <pydicom.tests.test_handler_util.TestNumpy_PaletteColor object at 0x7f017d5c1df0>

    def test_invalid_bit_depth_raises(self):
        """Test that an invalid bit depth raises an exception."""
        ds = dcmread(PAL_08_256_0_16_1F)
        ds.RedPaletteColorLookupTableDescriptor[2] = 15
        msg = (
            r'data type "uint15" not understood'
        )
        with pytest.raises(TypeError, match=msg):
>           apply_color_lut(ds.pixel_array, ds)
E           AssertionError: Pattern 'data type "uint15" not understood' does not match "data type 'uint15' not understood"

pydicom/tests/test_handler_util.py:951: AssertionError
pydicom/pydicom

Answer questions alcir

Here attached some more outputs, including versions of packages.

root.log build.log

useful!

Related questions

Cannot open 16-bit lossless jpeg with Pillow hot 1
Add DICOMDIR abilities hot 1
AttributeError: 'FileDataset' object has no attribute 'RescaleIntercept' hot 1
Wrong encoding occurs if the value 1 of SpecificCharacterSets is ISO 2022 IR 13. hot 1
Problem with reading JPEG image hot 1
Error when using pickle on a dataset hot 1
source:https://uonfu.com/
Github User Rank List