1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-03 23:48:07 +03:00

Fix overflow-wrap test

This commit is contained in:
Guillaume Ayoub 2021-12-13 11:16:43 +01:00
parent 3c382e399b
commit a27aa37597

View File

@ -925,8 +925,8 @@ def test_overflow_wrap(wrap, text, test, full_text):
@pytest.mark.parametrize('wrap, text, body_width, expected_width', (
('anywhere', 'aaaaaa', 10, 20),
('anywhere', 'aaaaaa', 40, 40),
('break-word', 'aaaaaa', 40, 100),
('normal', 'aaaaaa', 40, 100),
('break-word', 'aaaaaa', 40, 120),
('normal', 'aaaaaa', 40, 120),
))
def test_overflow_wrap_2(wrap, text, body_width, expected_width):
page, = render_pages('''
@ -935,8 +935,7 @@ def test_overflow_wrap_2(wrap, text, body_width, expected_width):
body {width: %dpx; font-family: weasyprint; font-size: 20px; }
table {overflow-wrap: %s; white-space: normal; }
</style>
<table><tr><td>%s
''' % (body_width, wrap, text))
<table><tr><td>%s''' % (body_width, wrap, text))
html, = page.children
body, = html.children
table_wrapper, = body.children