def test_overflow_5(assert_pixels):
    # Regression test for https://github.com/Kozea/WeasyPrint/issues/2026
    assert_pixels('''
        BBBBBB__
        BBBBBB__
        BBBB____
        BBBB____
        BBBB____
        ________
        ________
        ________
    ''', '''
      <style>
        @page { size: 8px }
        body { font-family: weasyprint; line-height: 1; font-size: 2px }
        p { color: blue }
      </style>
      <p>abc</p>
      <p style="height: 3px; overflow: hidden">ab<br>ab<br>ab<br>ab</p>
      ''')
,
tests/draw/test_overflow.py