mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
fix: remove jieba compatibility shim
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
import jieba
|
||||
|
||||
from app.utils.jieba import cut
|
||||
|
||||
|
||||
def test_cut_accepts_legacy_hmm_argument():
|
||||
"""验证兼容封装仍支持旧 jieba.cut 的 HMM 参数名。"""
|
||||
"""验证分词封装支持旧 jieba.cut 的 HMM 参数名。"""
|
||||
words = cut("台湾后台测试", HMM=False)
|
||||
|
||||
assert "".join(words) == "台湾后台测试"
|
||||
assert "后台" in words
|
||||
|
||||
|
||||
def test_legacy_jieba_import_uses_compat_entrypoint():
|
||||
"""验证插件仍可通过旧 jieba.cut 入口使用主程序分词实现。"""
|
||||
words = list(jieba.cut("台湾后台测试", HMM=False))
|
||||
|
||||
assert "".join(words) == "台湾后台测试"
|
||||
assert "后台" in words
|
||||
|
||||
Reference in New Issue
Block a user