wand icon indicating copy to clipboard operation
wand copied to clipboard

openSUSE Tumbleweed s390x failure (2)

Open jayvdb opened this issue 3 years ago • 2 comments

Python 3.6 only atm. (I was skipping Python 3.6 previously, so this may have been a problem before but wasnt noticed. I'll re-run with Python 3.6 skipped so I can see if the same occurs for Python 3.8)

[   21s] ============================= test session starts ==============================
[   21s] platform linux -- Python 3.6.12, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.6
[   21s] cachedir: .pytest_cache
[   21s] Wand Version: 0.6.6
[   21s] ImageMagick Version: ImageMagick 7.0.11-0 Q16 s390x 2021-02-13 https://imagemagick.org
[   21s] rootdir: /home/abuild/rpmbuild/BUILD/wand-master
[   23s] collecting ... collected 562 items / 3 deselected / 559 selected
....
[   75s] =================================== FAILURES ===================================
[   75s] _______________________________ test_red_quantum _______________________________
[   75s] 
[   75s]     def test_red_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s]         assert Color('black').red_quantum == 0
[   75s] >       assert Color('red').red_quantum == q
[   75s] E       assert 2.6581314730161733e+36 == 65535
[   75s] E         +2.6581314730161733e+36
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:135: AssertionError
[   75s] ______________________________ test_green_quantum ______________________________
[   75s] 
[   75s]     def test_green_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s]         assert Color('black').green_quantum == 0
[   75s] >       assert Color('#0f0').green_quantum == q
[   75s] E       assert 2.6581314730161733e+36 == 65535
[   75s] E         +2.6581314730161733e+36
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:146: AssertionError
[   75s] ______________________________ test_blue_quantum _______________________________
[   75s] 
[   75s]     def test_blue_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s]         assert Color('black').blue_quantum == 0
[   75s] >       assert Color('blue').blue_quantum == q
[   75s] E       assert 2.6581314730161733e+36 == 65535
[   75s] E         +2.6581314730161733e+36
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:157: AssertionError
[   75s] ______________________________ test_alpha_quantum ______________________________
[   75s] 
[   75s]     def test_alpha_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s] >       assert Color('rgba(0, 0, 0, 1)').alpha_quantum == q
[   75s] E       assert 2.6581314730161733e+36 == 65535
[   75s] E         +2.6581314730161733e+36
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:167: AssertionError
[   75s] ______________________________ test_cyan_quantum _______________________________
[   75s] 
[   75s]     def test_cyan_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s] >       assert int(Color('cmyk(100%, 0, 0, 0)').cyan_quantum) == q
[   75s] E       assert 2658131473016...30964540112896 == 65535
[   75s] E         +2658131473016173319080830964540112896
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:177: AssertionError
[   75s] _____________________________ test_magenta_quantum _____________________________
[   75s] 
[   75s]     def test_magenta_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s] >       assert int(Color('cmyk(0, 100%, 0, 0)').magenta_quantum) == q
[   75s] E       assert 2658131473016...30964540112896 == 65535
[   75s] E         +2658131473016173319080830964540112896
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:186: AssertionError
[   75s] _____________________________ test_yellow_quantum ______________________________
[   75s] 
[   75s]     def test_yellow_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s] >       assert int(Color('cmyk(0, 0, 100%, 0)').yellow_quantum) == q
[   75s] E       assert 2658131473016...30964540112896 == 65535
[   75s] E         +2658131473016173319080830964540112896
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:195: AssertionError
[   75s] ______________________________ test_black_quantum ______________________________
[   75s] 
[   75s]     def test_black_quantum():
[   75s]         q = 2 ** QUANTUM_DEPTH - 1
[   75s] >       assert int(Color('cmyk(0, 0, 0, 100%)').black_quantum) == q
[   75s] E       assert 2658131473016...30964540112896 == 65535
[   75s] E         +2658131473016173319080830964540112896
[   75s] E         -65535
[   75s] 
[   75s] tests/color_test.py:204: AssertionError
[   75s] ________________________________ test_red_int8 _________________________________
[   75s] 
[   75s]     def test_red_int8():
[   75s]         assert Color('black').red_int8 == 0
[   75s]         assert Color('red').red_int8 == 255
[   75s]         assert Color('white').red_int8 == 255
[   75s] >       assert Color('rgba(128, 0, 0, 1)').red_int8 == 128
[   75s] E       assert 255 == 128
[   75s] E         +255
[   75s] E         -128
[   75s] 
[   75s] tests/color_test.py:215: AssertionError
[   75s] _______________________________ test_green_int8 ________________________________
[   75s] 
[   75s]     def test_green_int8():
[   75s]         assert Color('black').green_int8 == 0
[   75s]         assert Color('#0f0').green_int8 == 255
[   75s]         assert Color('white').green_int8 == 255
[   75s] >       assert Color('rgba(0, 128, 0, 1)').green_int8 == 128
[   75s] E       assert 255 == 128
[   75s] E         +255
[   75s] E         -128
[   75s] 
[   75s] tests/color_test.py:225: AssertionError
[   75s] ________________________________ test_blue_int8 ________________________________
[   75s] 
[   75s]     def test_blue_int8():
[   75s]         assert Color('black').blue_int8 == 0
[   75s]         assert Color('blue').blue_int8 == 255
[   75s]         assert Color('white').blue_int8 == 255
[   75s] >       assert Color('rgba(0, 0, 128, 1)').blue_int8 == 128
[   75s] E       assert 255 == 128
[   75s] E         +255
[   75s] E         -128
[   75s] 
[   75s] tests/color_test.py:235: AssertionError
[   75s] _______________________________ test_alpha_int8 ________________________________
[   75s] 
[   75s]     def test_alpha_int8():
[   75s]         assert Color('rgba(0, 0, 0, 1)').alpha_int8 == 255
[   75s]         assert Color('rgba(0, 0, 0, 0)').alpha_int8 == 0
[   75s]         if not (Color('rgb(127,0,0)').red_quantum <=
[   75s]                 Color('rgba(0,0,0,0.5').alpha_quantum <=
[   75s]                 Color('rgb(128,0,0)').red_quantum):
[   75s]             # FIXME: I don't know why, but the value PixelGetAlphaQuantum() returns
[   75s]             #        is inconsistent to other PixelGet{Red,Green,Blue}Quantum()
[   75s]             #        functions in Travis CI.  We just skip the test in this case.
[   75s]             return
[   75s] >       assert 127 <= Color('rgba(0, 0, 0, 0.5)').alpha_int8 <= 128
[   75s] E       AssertionError: assert 255 <= 128
[   75s] E        +  where 255 = wand.color.Color('srgba(0,0,0,0.5)').alpha_int8
[   75s] E        +    where wand.color.Color('srgba(0,0,0,0.5)') = Color('rgba(0, 0, 0, 0.5)')
[   75s] 
[   75s] tests/color_test.py:251: AssertionError
[   75s] _____________________________ test_color_repr_html _____________________________
[   75s] 
[   75s]     def test_color_repr_html():
[   75s]         with Color('#AABBCC') as c:
[   75s] >           assert '#AABBCC' in c._repr_html_()
[   75s] E           assert '#AABBCC' in '\n        <span style="background-color:#FFFFFF;\n                     display:inline-block;\n                     line-height:1em;\n                     width:1em;">&nbsp;</span>\n        <strong>#FFFFFF</strong>\n        '
[   75s] E            +  where '\n        <span style="background-color:#FFFFFF;\n                     display:inline-block;\n                     line-height:1em;\n                     width:1em;">&nbsp;</span>\n        <strong>#FFFFFF</strong>\n        ' = <bound method Color._repr_html_ of wand.color.Color('srgb(170,187,204)')>()
[   75s] E            +    where <bound method Color._repr_html_ of wand.color.Color('srgb(170,187,204)')> = wand.color.Color('srgb(170,187,204)')._repr_html_
[   75s] 
[   75s] tests/color_test.py:357: AssertionError
[   75s] ________________________________ test_evaluate _________________________________
[   75s] 
[   75s] fx_asset = local('/home/abuild/rpmbuild/BUILD/wand-master/tests/assets')
[   75s] 
[   75s]     def test_evaluate(fx_asset):
[   75s]         with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]             with img.clone() as percent_img:
[   75s]                 fifty_percent = percent_img.quantum_range * 0.5
[   75s]                 percent_img.evaluate('set', fifty_percent)
[   75s]                 with percent_img[10, 10] as gray:
[   75s]                     assert abs(gray.red - Color('gray50').red) < 0.01
[   75s]             with img.clone() as literal_img:
[   75s]                 literal_img.evaluate('divide', 2, channel='red')
[   75s]                 with img[0, 0] as org_color:
[   75s]                     expected_color = (org_color.red_int8 * 0.5)
[   75s]                     with literal_img[0, 0] as actual_color:
[   75s] >                       assert abs(expected_color - actual_color.red_int8) < 1
[   75s] E                       AssertionError: assert 127.5 < 1
[   75s] E                        +  where 127.5 = abs((127.5 - 255))
[   75s] E                        +    where 255 = wand.color.Color('srgb(35.098%,35.098%,35.098%)').red_int8
[   75s] 
[   75s] tests/image_methods_test.py:784: AssertionError
[   75s] __________________________________ test_level __________________________________
[   75s] 
[   75s] fx_asset = local('/home/abuild/rpmbuild/BUILD/wand-master/tests/assets')
[   75s] 
[   75s]     def test_level(fx_asset):
[   75s]         with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]             # Adjust the levels to make this image entirely black
[   75s]             img.level(black=0.99, white=1.0)
[   75s]             with img[0, 0] as dark:
[   75s]                 assert dark.red_int8 <= dark.green_int8 <= dark.blue_int8 <= 0
[   75s]             with img[0, -1] as dark:
[   75s]                 assert dark.red_int8 <= dark.green_int8 <= dark.blue_int8 <= 0
[   75s]         with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]             # Adjust the levels to make this image entirely white
[   75s]             img.level(0, 0.01)
[   75s]             with img[0, 0] as light:
[   75s]                 assert light.red_int8 >= light.green_int8 >= light.blue_int8 >= 255
[   75s]             with img[0, -1] as light:
[   75s]                 assert light.red_int8 >= light.green_int8 >= light.blue_int8 >= 255
[   75s]         with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]             # Adjust the image's gamma to darken its midtones
[   75s]             img.level(gamma=0.5)
[   75s]             with img[0, len(img) // 2] as light:
[   75s] >               assert light.red_int8 <= light.green_int8 <= light.blue_int8 <= 65
[   75s] E               AssertionError: assert 255 <= 65
[   75s] E                +  where 255 = wand.color.Color('srgb(24.8051%,24.8051%,24.8051%)').blue_int8
[   75s] 
[   75s] tests/image_methods_test.py:1199: AssertionError
[   75s] ______________________________ test_level_channel ______________________________
[   75s] 
[   75s] fx_asset = local('/home/abuild/rpmbuild/BUILD/wand-master/tests/assets')
[   75s] 
[   75s]     def test_level_channel(fx_asset):
[   75s]         for chan in ('red', 'green', 'blue'):
[   75s]             c = chan + '_int8'
[   75s]             with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]                 # Adjust each channel level to make it entirely black
[   75s]                 img.level(0.99, 1.0, channel=chan)
[   75s]                 assert(getattr(img[0, 0], c) <= 0)
[   75s]                 assert(getattr(img[0, -1], c) <= 0)
[   75s]             with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]                 # Adjust each channel level to make it entirely white
[   75s]                 img.level(0.0, 0.01, channel=chan)
[   75s]                 assert(getattr(img[0, 0], c) >= 255)
[   75s]                 assert(getattr(img[0, -1], c) >= 255)
[   75s]             with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]                 # Adjust each channel's gamma to darken its midtones
[   75s]                 img.level(gamma=0.5, channel=chan)
[   75s]                 with img[0, len(img) // 2] as light:
[   75s] >                   assert(getattr(light, c) <= 65)
[   75s] E                   AssertionError: assert 255 <= 65
[   75s] E                    +  where 255 = getattr(wand.color.Color('srgb(24.8051%,24.8051%,24.8051%)'), 'red_int8')
[   75s] 
[   75s] tests/image_methods_test.py:1226: AssertionError
[   75s] _____________________________ test_negate_default ______________________________
[   75s] 
[   75s] fx_asset = local('/home/abuild/rpmbuild/BUILD/wand-master/tests/assets')
[   75s] 
[   75s]     def test_negate_default(fx_asset):
[   75s]         def test(c1, c2):
[   75s]             assert (c1.red_int8 + c2.red_int8 == 255 and
[   75s]                     c1.green_int8 + c2.green_int8 == 255 and
[   75s]                     c1.blue_int8 + c2.blue_int8 == 255)
[   75s]         with Image(filename=str(fx_asset.join('gray_range.jpg'))) as img:
[   75s]             left_top = img[0, 0]
[   75s]             left_bottom = img[0, -1]
[   75s]             right_top = img[-1, 0]
[   75s]             right_bottom = img[-1, -1]
[   75s]             img.negate()
[   75s] >           test(left_top, img[0, 0])
[   75s] 
[   75s] tests/image_methods_test.py:1508: 
[   75s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   75s] 
[   75s] c1 = wand.color.Color('srgb(179,179,179)')
[   75s] c2 = wand.color.Color('srgb(76,76,76)')
[   75s] 
[   75s]     def test(c1, c2):
[   75s] >       assert (c1.red_int8 + c2.red_int8 == 255 and
[   75s]                 c1.green_int8 + c2.green_int8 == 255 and
[   75s]                 c1.blue_int8 + c2.blue_int8 == 255)
[   75s] E       assert (510 == 255
[   75s] E         +510
[   75s] E         -255)
[   75s] 
[   75s] tests/image_methods_test.py:1499: AssertionError
[   75s] =============================== warnings summary ===============================
[   75s] tests/color_test.py::test_user_error
[   75s]   /home/abuild/rpmbuild/BUILD/wand-master/wand/color.py:113: OptionWarning: unrecognized color `not_a_color' @ warning/color.c/GetColorCompliance/1054
[   75s]     self.raise_exception()
[   75s] 
[   75s] -- Docs: https://docs.pytest.org/en/stable/warnings.html
[   75s] =========================== short test summary info ============================
[   75s] SKIPPED [1] tests/color_test.py:316: memory_usage is unavailable, or untestable
[   75s] SKIPPED [1] tests/drawing_test.py:347: wand.drawing.Drawing.matte removed with IM 7.
[   75s] SKIPPED [1] tests/drawing_test.py:360: wand.drawing.Drawing.matte removed with IM 7.
[   75s] SKIPPED [1] tests/image_test.py:543: Numpy not available.
[   75s] SKIPPED [1] tests/image_test.py:565: Numpy not available.
[   75s] SKIPPED [1] tests/image_test.py:583: Numpy not available.
[   75s] = 17 failed, 535 passed, 6 skipped, 3 deselected, 1 xfailed, 1 warning in 53.55s =

jayvdb avatar Feb 25 '21 09:02 jayvdb

Python 3.8 has the same failures, and that build does have numpy:

[  232s] =============================== warnings summary ===============================
[  232s] tests/color_test.py::test_user_error
[  232s]   /home/abuild/rpmbuild/BUILD/wand-master/wand/color.py:113: OptionWarning: unrecognized color `not_a_color' @ warning/color.c/GetColorCompliance/1054
[  232s]     self.raise_exception()
[  232s] 
[  232s] -- Docs: https://docs.pytest.org/en/stable/warnings.html
[  232s] =========================== short test summary info ============================
[  232s] SKIPPED [1] tests/color_test.py:316: memory_usage is unavailable, or untestable
[  232s] SKIPPED [1] tests/drawing_test.py:347: wand.drawing.Drawing.matte removed with IM 7.
[  232s] SKIPPED [1] tests/drawing_test.py:360: wand.drawing.Drawing.matte removed with IM 7.
[  232s] = 17 failed, 538 passed, 3 skipped, 3 deselected, 1 xfailed, 1 warning in 175.14s (0:02:55) =

fwiw, as only s390x is failing tests, I would be happy submitting Wand into the main distro collection. It regularly has packages which are broken, and I doubt there will be many s390x users wanting this urgently.

jayvdb avatar Feb 25 '21 09:02 jayvdb

Ah. I would agree s390x is not really worth holding the package up, but it is possible I messed something up when addressing the ARM issues. Especially since it was working on other distros last week.

emcconville avatar Feb 25 '21 20:02 emcconville