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

Tests failing #2420

Open
luca-vercelli opened this issue Mar 25, 2025 · 1 comment
Open

Tests failing #2420

luca-vercelli opened this issue Mar 25, 2025 · 1 comment

Comments

@luca-vercelli
Copy link
Contributor

I downloaded the vanilla source code (main branch), and ran tests. I see a lot of tests fail.
I know that tests should not fail because of CI
Running Ubuntu 22.04.5 LTS on WSL. Python 3.10.12.

Commands that I launched:

sudo apt install ghostscript fonts-dejavu python3.10-venv
git checkout https://github.com/Kozea/WeasyPrint.git
cd WeasyPrint
python -m venv venv
. venv/bin/activate
venv/bin/pip install -e '.[doc,test]'
venv/bin/python -m pytest > test-results.txt

These are the results:

============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/operatore/git/WeasyPrint
configfile: pyproject.toml
collected 3264 items

tests/css/test_common.py ...............                                 [  0%]
tests/css/test_counters.py ........x......................               [  1%]
tests/css/test_descriptors.py ................                           [  1%]
tests/css/test_errors.py ............                                    [  2%]
tests/css/test_expanders.py ............................................ [  3%]
........................................................................ [  5%]
........................................................................ [  8%]
........................................................................ [ 10%]
.....................................................                    [ 11%]
tests/css/test_fonts.py .....................                            [ 12%]
tests/css/test_nesting.py ........                                       [ 12%]
tests/css/test_pages.py ........................                         [ 13%]
tests/css/test_target.py .......                                         [ 13%]
tests/css/test_ua.py ...                                                 [ 13%]
tests/css/test_validation.py ........................................... [ 15%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 21%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 28%]
........................................................................ [ 30%]
........................................................................ [ 32%]
........................................................................ [ 34%]
........................................................................ [ 37%]
....................................................                     [ 38%]
tests/css/test_variables.py ............................................ [ 40%]
........................................................................ [ 42%]
........................................................................ [ 44%]
..............................................                           [ 45%]
tests/draw/svg/test_bounding_box.py ......x..xx.                         [ 46%]
tests/draw/svg/test_clip.py ..x                                          [ 46%]
tests/draw/svg/test_defs.py ..                                           [ 46%]
tests/draw/svg/test_gradients.py ..............................          [ 47%]
tests/draw/svg/test_images.py ........x....                              [ 47%]
tests/draw/svg/test_markers.py ........                                  [ 48%]
tests/draw/svg/test_opacity.py ..xxF..                                   [ 48%]
tests/draw/svg/test_paths.py ......................                      [ 48%]
tests/draw/svg/test_patterns.py .......                                  [ 49%]
tests/draw/svg/test_shapes.py ...................                        [ 49%]
tests/draw/svg/test_text.py F.F..F..FFFFFFFFFFFFFFFF                     [ 50%]
tests/draw/svg/test_transform.py .................                       [ 50%]
tests/draw/svg/test_units.py ....                                        [ 51%]
tests/draw/svg/test_visibility.py ........                               [ 51%]
tests/draw/test_absolute.py FFFFFFFFFFFFxFFFFFFFFF..                     [ 52%]
tests/draw/test_background.py .......................................... [ 53%]
...............                                                          [ 53%]
tests/draw/test_before_after.py ...                                      [ 53%]
tests/draw/test_box.py .................................                 [ 54%]
tests/draw/test_column.py ....                                           [ 55%]
tests/draw/test_current_color.py .....xF.                                [ 55%]
tests/draw/test_float.py ..FFFFFFFF..xxFFFFFFFFFFFFFxFx                  [ 56%]
tests/draw/test_footnote.py FFFFFFFFFFF                                  [ 56%]
tests/draw/test_footnote_column.py FFFFFFFFFx                            [ 56%]
tests/draw/test_gradient.py ...................                          [ 57%]
tests/draw/test_image.py ............................................... [ 58%]
......                                                                   [ 59%]
tests/draw/test_leader.py FFFFxxFxFFF...FFFF                             [ 59%]
tests/draw/test_list.py ...                                              [ 59%]
tests/draw/test_opacity.py ......                                        [ 59%]
tests/draw/test_overflow.py ....F....                                    [ 60%]
tests/draw/test_page.py ............                                     [ 60%]
tests/draw/test_table.py .....................x..FFF.FFxFFFFxFFFF        [ 61%]
tests/draw/test_text.py FF....FxFFFFFxFFFFF.........xxx.F.FF.FF.F.FFF    [ 63%]
tests/draw/test_transform.py ..............                              [ 63%]
tests/draw/test_visibility.py ....                                       [ 63%]
tests/draw/test_whitespace.py FFFFFFFFF                                  [ 63%]
tests/layout/test_block.py ............................................. [ 65%]
................x..........                                              [ 66%]
tests/layout/test_column.py ............................................ [ 67%]
..                                                                       [ 67%]
tests/layout/test_flex.py .............................................. [ 68%]
........................................................................ [ 71%]
............................................                             [ 72%]
tests/layout/test_float.py ..........................x..                 [ 73%]
tests/layout/test_footnotes.py ...x....................                  [ 74%]
tests/layout/test_grid.py ..............................                 [ 75%]
tests/layout/test_image.py ............................................. [ 76%]
......................                                                   [ 77%]
tests/layout/test_inline.py .x........F..xF............................. [ 78%]
.........                                                                [ 78%]
tests/layout/test_inline_block.py ..                                     [ 78%]
tests/layout/test_list.py .......x..                                     [ 79%]
tests/layout/test_page.py ..................................x........... [ 80%]
............................................................             [ 82%]
tests/layout/test_position.py ................                           [ 82%]
tests/layout/test_shrink_to_fit.py ..................................... [ 83%]
...................................................                      [ 85%]
tests/layout/test_table.py ............................................. [ 86%]
............x............F.............................................. [ 89%]
.............                                                            [ 89%]
tests/test_acid2.py .                                                    [ 89%]
tests/test_api.py ...................................................... [ 91%]
..................                                                       [ 91%]
tests/test_boxes.py .................................................... [ 93%]
.......                                                                  [ 93%]
tests/test_fonts.py .......                                              [ 93%]
tests/test_pdf.py ...............................................        [ 95%]
tests/test_presentational_hints.py .........                             [ 95%]
tests/test_stacking.py ........                                          [ 95%]
tests/test_text.py ..................................................... [ 97%]
........................................................................ [ 99%]
.......x..                                                               [ 99%]
tests/test_unicode.py .                                                  [ 99%]
tests/test_url.py ...                                                    [100%]

Any idea of what am I doing wrong? Thank you!
Full log attached.

test-results.txt

@liZe
Copy link
Member

liZe commented Mar 25, 2025

test_pattern_gradient_stroke_fill_opacity probably fails because of a bug in Ghostscript that’s now been fixed. It’s marked as passing since 65, because all the CI platforms now have a versions of Ghostscript that’s recent enough.

For all the other tests, it looks like there’s a problem with the custom font we use (called weasyprint). These tests used to pass on CI with Ubuntu 22.04.

Running Ubuntu 22.04.5 LTS on WSL. Python 3.10.12.

I bet WSL is somehow related to this problem, we’ve never launched tests with this setup. Could you please try @font-face and tell us if it works on WSL?

You can also try to install the tests/resources/weasyprint.otf font and see if it fixes most of the tests (not all, because we have different weasyprint fonts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants