Fix unit test

main
Bob Mottram 2025-06-03 14:22:36 +01:00
parent c7159d3843
commit 921f17c542
2 changed files with 8 additions and 8 deletions

View File

@ -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'

View File

@ -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',