@assert_no_logs
def test_transforms():
    assert expand_to_dict('transform: none') == {
        'transform': []}
    assert expand_to_dict(
        'transform: translate(6px) rotate(90deg)'
    ) == {'transform': [('translate', ((6, 'px'), (0, 'px'))),
                        ('rotate', math.pi / 2)]}
    assert expand_to_dict(
        'transform: translate(-4px, 0)'
    ) == {'transform': [('translate', ((-4, 'px'), (0, None)))]}
    assert expand_to_dict(
        'transform: translate(6px, 20%)'
    ) == {'transform': [('translate', ((6, 'px'), (20, '%')))]}
    assert expand_to_dict(
        'transform: scale(2)'
    ) == {'transform': [('scale', (2, 2))]}
    assert_invalid('transform: translate(6px 20%)')  # missing comma
    assert_invalid('transform: lipsumize(6px)')
    assert_invalid('transform: foo')
    assert_invalid('transform: scale(2) foo')
    assert_invalid('transform: 6px')
    assert_invalid('-weasy-transform: none',
                   'the property was unprefixed, use transform')
dataset/ETHPy150Open Kozea/WeasyPrint/weasyprint/tests/test_css_validation.py/test_transforms/original