forked from openlp/openlp
Even more test fixes
This commit is contained in:
parent
3d6e1b7008
commit
aad5d79093
@ -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>'
|
||||||
|
@ -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">' \
|
||||||
' </span> <span class="chord"><span><strong>G/B</strong></span></span></span>'
|
' </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'
|
||||||
|
Loading…
Reference in New Issue
Block a user