def test_bounding_box_line(assert_pixels):
    assert_pixels('''
        BB___
        BBB__
        _BRR_
        __RRR
        ___RR
    ''', '''
      <style>
        @page { size: 5px }
        svg { display: block }
      </style>
      <svg width="5px" height="5px" xmlns="http://www.w3.org/2000/svg">
        <defs>
          <linearGradient id="grad" x1="0" y1="0" x2="1" y2="1"
            gradientUnits="objectBoundingBox">
            <stop stop-color="blue" offset="50%"></stop>
            <stop stop-color="red" offset="50%"></stop>
          </linearGradient>
        </defs>
        <line x1="0" y1="0" x2="5" y2="5"
              stroke-width="1" stroke="url(#grad)" />
      </svg>
    ''')
,
tests/draw/svg/test_bounding_box.py