def test_radial_gradient(assert_pixels):
    assert_pixels('''
        ____________
        _rrrrrrrrrr_
        _rrrrrrrrrr_
        _rrrrBBrrrr_
        _rrrBBBBrrr_
        _rrBBBBBBrr_
        _rrBBBBBBrr_
        _rrrBBBBrrr_
        _rrrrBBrrrr_
        _rrrrrrrrrr_
        _rrrrrrrrrr_
        ____________
    ''', '''
      <style>
        @page { size: 12px }
        svg { display: block }
      </style>
      <svg width="12px" height="12px" xmlns="http://www.w3.org/2000/svg">
        <defs>
          <radialGradient id="grad" cx="0.5" cy="0.5" r="0.5"
            fx="0.5" fy="0.5" fr="0.2"
            gradientUnits="objectBoundingBox">
            <stop stop-color="blue" offset="25%"></stop>
            <stop stop-color="red" offset="25%"></stop>
          </radialGradient>
        </defs>
        <rect x="1" y="1" width="10" height="10" fill="url(#grad)" />
      </svg>
    ''')
,
tests/draw/svg/test_gradients.py