Even more test fixes

This commit is contained in:
STEPHANVS 2021-07-04 18:33:18 +02:00
parent 3d6e1b7008
commit aad5d79093
No known key found for this signature in database
GPG Key ID: 4EFE47E471FD62A9
2 changed files with 5 additions and 5 deletions

View File

@ -47,8 +47,8 @@ log = logging.getLogger(__name__)
ENGLISH_NOTES = '[CDEFGAB]?' ENGLISH_NOTES = '[CDEFGAB]?'
GERMAN_NOTES = '[CDEFGABH]?' GERMAN_NOTES = '[CDEFGABH]?'
NEOLATIN_NOTES = '(Do|Re|Mi|Fa|Sol|La|Si)?' NEOLATIN_NOTES = '(Do|Re|Mi|Fa|Sol|La|Si)?'
CHORD_PREFIXES = '(=|\(|\|)*?' CHORD_PREFIXES = '(=|\\(|\\|)*?'
CHORD_SUFFIXES = '(b|bb|#|##|x|-|m|maj|min|sus|dim|0|1|2|3|4|5|6|7|8|9|\))*?' CHORD_SUFFIXES = '(b|bb|#|##|x|-|m|maj|min|sus|dim|0|1|2|3|4|5|6|7|8|9|\\))*?'
SLIM_CHARS = 'fiíIÍjlĺľrtť.,;/ ()|"\'!:\\' SLIM_CHARS = 'fiíIÍjlĺľrtť.,;/ ()|"\'!:\\'
CHORD_TEMPLATE = '<span class="chordline">{chord}</span>' CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'
FIRST_CHORD_TEMPLATE = '<span class="chordline">{chord}</span>' FIRST_CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'

View File

@ -104,7 +104,7 @@ def test_render_chords(settings):
text_with_rendered_chords = render_chords(text_with_chords) text_with_rendered_chords = render_chords(text_with_chords)
# THEN: We should get html that looks like below # THEN: We should get html that looks like below
expected_html = '<span class="chordline firstchordline">H<span class="chord"><span><strong>C</strong></span>' \ expected_html = '<span class="chordline">H<span class="chord"><span><strong>C</strong></span>' \
'</span>alleluya.<span class="chord"><span><strong>F</strong></span></span><span class="ws">' \ '</span>alleluya.<span class="chord"><span><strong>F</strong></span></span><span class="ws">' \
'&nbsp;&nbsp;</span> <span class="chord"><span><strong>G/B</strong></span></span></span>' '&nbsp;&nbsp;</span> <span class="chord"><span><strong>G/B</strong></span></span></span>'
assert text_with_rendered_chords == expected_html, 'The rendered chords should look as expected' assert text_with_rendered_chords == expected_html, 'The rendered chords should look as expected'