def test_before_after_2(assert_same_renderings):
    assert_same_renderings(
        '''
            <style>
                @page { size: 500px 30px }
                body { margin: 0; quotes: '«' '»' '“' '”' }
                q:before { content: open-quote ' '}
                q:after { content: ' ' close-quote }
            </style>
            <p><q>Lorem ipsum <q>dolor</q> sit amet</q></p>
        ''',
        '''
            <style>
                @page { size: 500px 30px }
                body { margin: 0 }
                q:before, q:after { content: none }
            </style>
            <p><span><span>« </span>Lorem ipsum
                <span><span>“ </span>dolor<span> ”</span></span>
                sit amet<span> »</span></span></p>
        ''', tolerance=10)
<style>
@page { size: 500px 30px }
body { margin: 0; quotes: '«' '»' '“' '”' }
q:before { content: open-quote ' '}
q:after { content: ' ' close-quote }
</style>
<p><q>Lorem ipsum <q>dolor</q> sit amet</q></p>
''',
tests/draw/test_before_after.py