Browse Source

Move Unicode 15 emoji test to SimpleString test

merge-requests/159/head
Andrew Shu 5 months ago
parent
commit
a7b7613ce4
  1. 5
      tildes/tests/test_simplestring_field.py
  2. 6
      tildes/tests/test_string.py

5
tildes/tests/test_simplestring_field.py

@ -99,3 +99,8 @@ def test_consecutive_spaces_collapsed():
"""Ensure runs of consecutive spaces are "collapsed" inside the string."""
original = "I wanted to space this out"
assert process_string(original) == "I wanted to space this out"
def test_unicode_15_moose_kept():
"""Ensure newer emoji introduced in Unicode 15 are kept."""
assert process_string("🫎") == "🫎"

6
tildes/tests/test_string.py

@ -8,7 +8,6 @@ from tildes.lib.string import (
truncate_string_at_char,
word_count,
extract_text_from_html,
_sanitize_characters,
)
@ -174,8 +173,3 @@ def test_extract_text_from_html_exclude_details():
html = "<details><p>Hide me!</p></details>"
text = extract_text_from_html(html, exclude_details_include_summary=True)
assert text == "Details"
def test_sanitize_characters_keeps_unicode_15_moose():
"""Ensure _sanitize_characters keeps a newer emoji introduced in Unicode 15."""
assert _sanitize_characters("🫎") == "🫎"
Loading…
Cancel
Save