Files
archived-MoviePilot/tests/test_jieba_utils.py
2026-05-23 13:05:32 +08:00

10 lines
276 B
Python

from app.utils.jieba import cut
def test_cut_accepts_legacy_hmm_argument():
"""验证分词封装支持旧 jieba.cut 的 HMM 参数名。"""
words = cut("台湾后台测试", HMM=False)
assert "".join(words) == "台湾后台测试"
assert "后台" in words