Improve pylint testing, fixed a few issues.

This commit is contained in:
Tomas Groth 2016-08-01 19:42:29 +02:00
parent 291c9c8902
commit 189b2dd400
2 changed files with 3 additions and 3 deletions

View File

@ -458,7 +458,7 @@ class OpenLyrics(object):
self._add_tag_to_formatting(tag, tags_element)
# Replace end tags.
for tag in end_tags:
text = text.replace('{/{tag}}}'.format(tag=tag), '</tag>')
text = text.replace('{{{tag}}}'.format(tag=tag), '</tag>')
# Replace \n with <br/>.
text = text.replace('\n', '<br/>')
element = etree.XML('<lines>{text}</lines>'.format(text=text))
@ -643,7 +643,7 @@ class OpenLyrics(object):
# Append text from tail and add formatting end tag.
# TODO: Verify format() with template variables
if element.tag == NSMAP % 'tag' and use_endtag:
text += '{/{name}}}'.format(name=element.get('name'))
text += '{{{name}}}'.format(name=element.get('name'))
# Append text from tail.
if element.tail:
text += element.tail

View File

@ -48,7 +48,7 @@ class TestPylint(TestCase):
"""
# GIVEN: Some checks to disable and enable, and the pylint script
disabled_checks = 'import-error,no-member'
enabled_checks = 'missing-format-argument-key,unused-format-string-argument'
enabled_checks = 'missing-format-argument-key,unused-format-string-argument,bad-format-string'
if is_win() or 'arch' in platform.dist()[0].lower():
pylint_script = 'pylint'
else: