def test_leader_float_leader(assert_pixels):
    # Test regression: https://github.com/Kozea/WeasyPrint/issues/1409
    # Leaders in floats are not displayed at all in many cases with the current
    # implementation, and this case is not really specified. So…
    assert_pixels('''
        RR____________BB
        RR____________BB
        RRRR__________BB
        RRRR__________BB
        RR____________BB
        RR____________BB
    ''', '''
      <style>
        @page {
          size: 16px 6px;
        }
        body {
          color: red;
          font-family: weasyprint;
          font-size: 2px;
          line-height: 1;
        }
        div::after {
          color: blue;
          content: leader(' . ') 'a';
          float: right;
        }
      </style>
      <div>a</div>
      <div>bb</div>
      <div>c</div>
    ''')
,
tests/draw/test_leader.py