This commit is contained in:
Kovid Goyal 2019-07-11 14:10:39 +05:30
parent b0d18ffb41
commit 081f4989b7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals from __future__ import absolute_import, division, print_function, unicode_literals
def _optimize(tagList, tagName, conversion): def _optimize(tagList, tagName, conversion):
# copy the tag of interest plus any text # copy the tag of interest plus any text
newTagList = [] newTagList = []

View File

@ -393,7 +393,8 @@ def test_normalization(return_tests=False): # {{{
tuple('0 0 0 0'.split()) : '0', tuple('0 0 0 0'.split()) : '0',
}): }):
for prefix in ('margin', 'padding'): for prefix in ('margin', 'padding'):
css = {'%s-%s' % (prefix, x) : unicode_type(y)+'pt' if isinstance(y, numbers.Number) else y for x, y in zip(('left', 'top', 'right', 'bottom'), s)} css = {'%s-%s' % (prefix, x) : unicode_type(y)+'pt' if isinstance(y, numbers.Number) else y
for x, y in zip(('left', 'top', 'right', 'bottom'), s)}
css = '; '.join(('%s:%s' % (k, v) for k, v in iteritems(css))) css = '; '.join(('%s:%s' % (k, v) for k, v in iteritems(css)))
style = parseStyle(css) style = parseStyle(css)
condense_rule(style) condense_rule(style)