Initial speaking practice site
This commit is contained in:
commit
bcebeaef82
38 files changed
+10698
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from backend.db import repair_mojibake_text
|
||||
|
||||
|
||||
def test_repairs_chinese_mojibake():
|
||||
assert repair_mojibake_text("æªåç±»") == "未分类"
|
||||
|
||||
|
||||
def test_repairs_english_punctuation_mojibake():
|
||||
assert repair_mojibake_text("employeesâ lives") == "employees’ lives"
|
||||
|
||||
|
||||
def test_keeps_normal_text_unchanged():
|
||||
assert repair_mojibake_text("未分类") == "未分类"
|
||||
assert repair_mojibake_text("English") == "English"
|
||||
Reference in new issue
Block a user