Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_borders_table_collapse and assert_different_renderings seem flaky #2305

Closed
benoitkugler opened this issue Nov 15, 2024 · 4 comments · Fixed by #2323
Closed

test_borders_table_collapse and assert_different_renderings seem flaky #2305

benoitkugler opened this issue Nov 15, 2024 · 4 comments · Fixed by #2323
Labels
bug Existing features not working as expected

Comments

@benoitkugler
Copy link

Hi,

I think there is currently two issues regarding test_borders_table_collapse :

  1. Under collapsed borders, the groove and outset styles render the same (as well as the inset/ridge pair), so that the test should not ask for different renderings
  2. I think Weasyprint actually properly follows the spec, but that assert_different_renderings seems broken : at tests/draw/init.py line 85, the pixels comparison pixels_1 == pixels_2 seems to always be False, since the variables are compared by reference, not by actual pixel content. A simple fix should be to change the comparison to list(pixels_1) == list(pixels_2)

From what I understand, no change is required to the library, only to the tests.

@liZe
Copy link
Member

liZe commented Nov 15, 2024

Hi,

Thanks for the report, I don’t know how you caught this! Interested in providing a pull request?

@liZe liZe added the bug Existing features not working as expected label Nov 15, 2024
@benoitkugler
Copy link
Author

I'm writing a port of WeasyPrint for the Go programming language. Thanks by the way for your work, it has been very interesting to dig into the depths of HTML rendering !
I've discovered the issue because the Go version of the test was failing, yet with a seemimgly correct rendering.

I can send a PR, not sure when however

@liZe
Copy link
Member

liZe commented Dec 7, 2024

I can send a PR, not sure when however

Let me do this for you 😄

Thanks again for the report!

@benoitkugler
Copy link
Author

Let me do this for you 😄

Thank you ;)

On est jamais mieux servi que par soi-même 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants