mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-04 07:57:52 +03:00
Fix overflow-wrap test
This commit is contained in:
parent
3c382e399b
commit
a27aa37597
@ -925,8 +925,8 @@ def test_overflow_wrap(wrap, text, test, full_text):
|
|||||||
@pytest.mark.parametrize('wrap, text, body_width, expected_width', (
|
@pytest.mark.parametrize('wrap, text, body_width, expected_width', (
|
||||||
('anywhere', 'aaaaaa', 10, 20),
|
('anywhere', 'aaaaaa', 10, 20),
|
||||||
('anywhere', 'aaaaaa', 40, 40),
|
('anywhere', 'aaaaaa', 40, 40),
|
||||||
('break-word', 'aaaaaa', 40, 100),
|
('break-word', 'aaaaaa', 40, 120),
|
||||||
('normal', 'aaaaaa', 40, 100),
|
('normal', 'aaaaaa', 40, 120),
|
||||||
))
|
))
|
||||||
def test_overflow_wrap_2(wrap, text, body_width, expected_width):
|
def test_overflow_wrap_2(wrap, text, body_width, expected_width):
|
||||||
page, = render_pages('''
|
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; }
|
body {width: %dpx; font-family: weasyprint; font-size: 20px; }
|
||||||
table {overflow-wrap: %s; white-space: normal; }
|
table {overflow-wrap: %s; white-space: normal; }
|
||||||
</style>
|
</style>
|
||||||
<table><tr><td>%s
|
<table><tr><td>%s''' % (body_width, wrap, text))
|
||||||
''' % (body_width, wrap, text))
|
|
||||||
html, = page.children
|
html, = page.children
|
||||||
body, = html.children
|
body, = html.children
|
||||||
table_wrapper, = body.children
|
table_wrapper, = body.children
|
||||||
|
Loading…
Reference in New Issue
Block a user