def test_border_image_gradient(assert_pixels):
    assert_pixels('''
        __________
        _RRRRRRRR_
        _RRRRRRRR_
        _RR____RR_
        _BB____BB_
        _BBBBBBBB_
        _BBBBBBBB_
        __________
    ''', '''
      <style>
        @page {
          size: 10px 8px;
        }
        div {
          border: 1px solid black;
          border-image-source: linear-gradient(to bottom, red, red 50%, blue 50%, blue);
          border-image-slice: 25%;
          border-image-width: 2;
          height: 4px;
          margin: 1px;
          width: 6px;
        }
      </style>
      <div></div>
    ''')
,
tests/draw/test_box.py