You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I tried to update WeasyPrint to v57 in Fedora rawhide but there are two failures in test_gradient.py (build server results). Full build logs (including versions) via koji but I extracted the pytest output so maybe you can see the problem quicker that way:
=================================== FAILURES ===================================
___________________________ test_linear_gradients_5 ____________________________
assert_pixels = <function assert_pixels.<locals>.<lambda> at 0x7f4f2333cd60>
@assert_no_logs
def test_linear_gradients_5(assert_pixels):
> assert_pixels('''
rBrrrBrrrB
rBrrrBrrrB
rBrrrBrrrB
rBrrrBrrrB
rBrrrBrrrB
''', '''
<style>@page { size: 10px 5px; background: repeating-linear-gradient(
to right, blue 50%, blue 60%, red 60%, red 90%
)''')
/builddir/build/BUILD/weasyprint-57.0/tests/draw/test_gradient.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/builddir/build/BUILD/weasyprint-57.0/tests/conftest.py:98: in <lambda>
return lambda *args, **kwargs: draw.assert_pixels(
/builddir/build/BUILD/weasyprint-57.0/tests/draw/__init__.py:55: in assert_pixels
assert_pixels_equal(name, width, height, pixels, expected_pixels)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'linear_gradients_5', width = 10, height = 5
raw = <ImagingCore object at 0x7f4f24552db0>
expected_raw = [(255, 0, 0), (0, 0, 255), (255, 0, 0), (255, 0, 0), (255, 0, 0), (0, 0, 255), ...]
tolerance = 0
def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0):
"""Take 2 matrices of pixels and assert that they are the same."""
if raw != expected_raw: # pragma: no cover
pixels = zip_longest(raw, expected_raw, fillvalue=(-1, -1, -1))
for i, (value, expected) in enumerate(pixels):
if expected is None:
continue
if any(abs(value - expected) > tolerance
for value, expected in zip(value, expected)):
actual_height = len(raw) // width
write_png(name, raw, width, actual_height)
expected_raw = [
pixel or (255, 255, 255) for pixel in expected_raw]
write_png(f'{name}.expected', expected_raw, width, height)
x = i % width
y = i // width
> assert 0, (
f'Pixel ({x}, {y}) in {name}: '
f'expected rgba{expected}, got rgba{value}')
E AssertionError: Pixel (0, 0) in linear_gradients_5: expected rgba(255, 0, 0), got rgba(255, 255, 255)
/builddir/build/BUILD/weasyprint-57.0/tests/draw/__init__.py:104: AssertionError
------------------------------ Captured log call -------------------------------
...
___________________________ test_linear_gradients_12 ___________________________
assert_pixels = <function assert_pixels.<locals>.<lambda> at 0x7f4f21f2b060>
@assert_no_logs
def test_linear_gradients_12(assert_pixels):
> assert_pixels('''
BBBBBBBBB
BBBBBBBBB
BBBBBBBBB
BBBBBBBBB
BBBBBBBBB
''', '''<style>@page { size: 9px 5px; background:
repeating-linear-gradient(to right, red 3px, blue 3px, blue 4px, red 4px
)''')
/builddir/build/BUILD/weasyprint-57.0/tests/draw/test_gradient.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/builddir/build/BUILD/weasyprint-57.0/tests/conftest.py:98: in <lambda>
return lambda *args, **kwargs: draw.assert_pixels(
/builddir/build/BUILD/weasyprint-57.0/tests/draw/__init__.py:55: in assert_pixels
assert_pixels_equal(name, width, height, pixels, expected_pixels)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'linear_gradients_12', width = 9, height = 5
raw = <ImagingCore object at 0x7f4f23bbb550>
expected_raw = [(0, 0, 255), (0, 0, 255), (0, 0, 255), (0, 0, 255), (0, 0, 255), (0, 0, 255), ...]
tolerance = 0
def assert_pixels_equal(name, width, height, raw, expected_raw, tolerance=0):
"""Take 2 matrices of pixels and assert that they are the same."""
if raw != expected_raw: # pragma: no cover
pixels = zip_longest(raw, expected_raw, fillvalue=(-1, -1, -1))
for i, (value, expected) in enumerate(pixels):
if expected is None:
continue
if any(abs(value - expected) > tolerance
for value, expected in zip(value, expected)):
actual_height = len(raw) // width
write_png(name, raw, width, actual_height)
expected_raw = [
pixel or (255, 255, 255) for pixel in expected_raw]
write_png(f'{name}.expected', expected_raw, width, height)
x = i % width
y = i // width
> assert 0, (
f'Pixel ({x}, {y}) in {name}: '
f'expected rgba{expected}, got rgba{value}')
E AssertionError: Pixel (0, 0) in linear_gradients_12: expected rgba(0, 0, 255), got rgba(255, 255, 255)
/builddir/build/BUILD/weasyprint-57.0/tests/draw/__init__.py:104: AssertionError
------------------------------ Captured log call -------------------------------
...
=============================== warnings summary ===============================
...
=========================== short test summary info ============================
FAILED tests/draw/test_gradient.py::test_linear_gradients_5 - AssertionError:...
FAILED tests/draw/test_gradient.py::test_linear_gradients_12 - AssertionError...
====== 2 failed, 1870 passed, 41 xfailed, 8 warnings in 90.75s (0:01:30) =======
I guess next thing is that you are asking me for the PDF generated in the test as you did previously? I can do that but not today.
The text was updated successfully, but these errors were encountered:
I tried to update WeasyPrint to v57 in Fedora rawhide but there are two failures in
test_gradient.py(build server results). Full build logs (including versions) via koji but I extracted the pytest output so maybe you can see the problem quicker that way:I guess next thing is that you are asking me for the PDF generated in the test as you did previously? I can do that but not today.
The text was updated successfully, but these errors were encountered: