mirror of https://gitlab.com/bashrc2/epicyon
Fix unit test
parent
c7159d3843
commit
921f17c542
|
|
@ -1235,6 +1235,9 @@ def _get_simplified_content(content: str) -> str:
|
||||||
replacements = {
|
replacements = {
|
||||||
',': ' ',
|
',': ' ',
|
||||||
';': ' ',
|
';': ' ',
|
||||||
|
'"': ' ',
|
||||||
|
'“': ' ',
|
||||||
|
'”': ' ',
|
||||||
'- ': ' '
|
'- ': ' '
|
||||||
}
|
}
|
||||||
content_simplified = replace_strings(content, replacements)
|
content_simplified = replace_strings(content, replacements)
|
||||||
|
|
@ -1382,9 +1385,7 @@ def add_html_tags(base_dir: str, http_prefix: str,
|
||||||
max_word_length = 40
|
max_word_length = 40
|
||||||
replacements = {
|
replacements = {
|
||||||
'\r': '',
|
'\r': '',
|
||||||
'\n': ' --linebreak-- ',
|
'\n': ' --linebreak-- '
|
||||||
'“': ' --openquote-- ',
|
|
||||||
'”': ' --closequote-- '
|
|
||||||
}
|
}
|
||||||
content = replace_strings(content, replacements)
|
content = replace_strings(content, replacements)
|
||||||
now_playing_str = 'NowPlaying'
|
now_playing_str = 'NowPlaying'
|
||||||
|
|
|
||||||
9
tests.py
9
tests.py
|
|
@ -4176,11 +4176,10 @@ def _test_addemoji(base_dir: str):
|
||||||
'class="mention hashtag" rel="tag" tabindex="10">' + \
|
'class="mention hashtag" rel="tag" tabindex="10">' + \
|
||||||
'<span aria-hidden="true">#</span>' + \
|
'<span aria-hidden="true">#</span>' + \
|
||||||
'<span>hashtag</span></a>".</p>'
|
'<span>hashtag</span></a>".</p>'
|
||||||
# TODO
|
if content_modified2 != expected_content2:
|
||||||
# if content_modified2 != expected_content2:
|
print('expected_content2: ' + expected_content2)
|
||||||
# print('expected_content2: ' + expected_content2)
|
print('content_modified2: ' + content_modified2)
|
||||||
# print('content_modified2: ' + content_modified2)
|
assert content_modified2 == expected_content2
|
||||||
# assert content_modified2 == expected_content2
|
|
||||||
|
|
||||||
os.chdir(base_dir_original)
|
os.chdir(base_dir_original)
|
||||||
shutil.rmtree(base_dir_original + '/.tests',
|
shutil.rmtree(base_dir_original + '/.tests',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue