def test_footnote_column_max_height(assert_pixels):
    assert_pixels('''
        RRRR_RRRR
        RRRR_RRRR
        RRRR_RRRR
        RRRR_RRRR
        _________
        RRRRRRRR_
        RRRRRRRR_
        RRRRRRRR_
        RRRRRRRR_
        RRRR_RRRR
        RRRR_RRRR
        _________
        _________
        _________
        _________
        _________
        RRRRRRRR_
        RRRRRRRR_
    ''', '''
    <style>
      @page {
        size: 9px 9px;
        @footnote {
          max-height: 2em;
        }
      }
      div {
        color: red;
        columns: 2;
        column-gap: 1px;
        font-family: weasyprint;
        font-size: 2px;
        line-height: 1;
      }
      span {
        float: footnote;
      }
    </style>
    <div>
      a<span>de</span> a<span>de</span>
      a<span>de</span> ab
      ab ab
    </div>''')
,
tests/draw/test_footnote_column.py