# Path: tests/testing_utils.py
# def assert_no_logs(function):
#     """Decorator that asserts that nothing is logged in a function."""
#     @functools.wraps(function)
#     def wrapper(*args, **kwargs):
#         with capture_logs() as logs:
#             try:
#                 function(*args, **kwargs)
#             except Exception:  # pragma: no cover
#                 if logs:
#                     print(f'{len(logs)} errors logged:', file=sys.stderr)
#                     for message in logs:
#                         print(message, file=sys.stderr)
#                 raise
#             else:
#                 if logs:  # pragma: no cover
#                     for message in logs:
#                         print(message, file=sys.stderr)
#                     raise AssertionError(f'{len(logs)} errors logged')
#     return wrapper
# 
# def render_pages(html_content):
#     """Lay out a document and return a list of PageBox objects."""
#     return [
#         page._page_box for page in
#         FakeHTML(string=html_content, base_url=BASE_URL).render().pages]


import pytest
from ..testing_utils import assert_no_logs, render_pages
        <li></li>
        <li>a</li>
      </ul>
    ''')
    html, = page.children
    body, = html.children
    unordered_list, = body.children
    li1, li2, li3 = unordered_list.children
    assert li1.position_y != li2.position_y != li3.position_y


@pytest.mark.xfail
def test_lists_whitespace_item():
    # Regression test for https://github.com/Kozea/WeasyPrint/issues/873
    page, = render_pages('''
      <ul>
        <li>a</li>
        <li> </li>
        <li>a</li>
      </ul>
    ''')
    html, = page.children
    body, = html.children
    unordered_list, = body.children
    li1, li2, li3 = unordered_list.children
    assert li1.position_y != li2.position_y != li3.position_y


def test_lists_page_break():
    # Regression test for https://github.com/Kozea/WeasyPrint/issues/945

# Path: tests/testing_utils.py
# def assert_no_logs(function):
#     """Decorator that asserts that nothing is logged in a function."""
#     @functools.wraps(function)
#     def wrapper(*args, **kwargs):
#         with capture_logs() as logs:
#             try:
#                 function(*args, **kwargs)
#             except Exception:  # pragma: no cover
#                 if logs:
#                     print(f'{len(logs)} errors logged:', file=sys.stderr)
#                     for message in logs:
#                         print(message, file=sys.stderr)
#                 raise
#             else:
#                 if logs:  # pragma: no cover
#                     for message in logs:
#                         print(message, file=sys.stderr)
#                     raise AssertionError(f'{len(logs)} errors logged')
#     return wrapper
# 
# def render_pages(html_content):
#     """Lay out a document and return a list of PageBox objects."""
#     return [
#         page._page_box for page in
#         FakeHTML(string=html_content, base_url=BASE_URL).render().pages]


# Path: tests/layout/test_list.py
import pytest
from ..testing_utils import assert_no_logs, render_pages

        <li></li>
        <li>a</li>
      </ul>
    ''')
    html, = page.children
    body, = html.children
    unordered_list, = body.children
    li1, li2, li3 = unordered_list.children
    assert li1.position_y != li2.position_y != li3.position_y


@pytest.mark.xfail
def test_lists_whitespace_item():
    # Regression test for https://github.com/Kozea/WeasyPrint/issues/873
    page, = render_pages('''
      <ul>
        <li>a</li>
        <li> </li>
        <li>a</li>
      </ul>
    ''')
    html, = page.children
    body, = html.children
    unordered_list, = body.children
    li1, li2, li3 = unordered_list.children
    assert li1.position_y != li2.position_y != li3.position_y


def test_lists_page_break():
    # Regression test for https://github.com/Kozea/WeasyPrint/issues/945

    page1, page2 = render_pages('''