def test_fill_opacity(assert_same_renderings):
    assert_same_renderings(
        opacity_source % '''
            <rect x="2" y="2" width="5" height="5"
                  fill="blue" opacity="50%" />
            <rect x="2" y="2" width="5" height="5" stroke-width="2"
                  stroke="lime" fill="transparent" />
        ''',
        opacity_source % '''
            <rect x="2" y="2" width="5" height="5" stroke-width="2"
                  stroke="lime" fill="blue" fill-opacity="0.5" />
        ''',
    )
,
opacity_source %
tests/draw/svg/test_opacity.py