diff --git a/test/test_kiwipiepy.py b/test/test_kiwipiepy.py index b5aea8b..09efb16 100644 --- a/test/test_kiwipiepy.py +++ b/test/test_kiwipiepy.py @@ -466,7 +466,7 @@ def test_add_rule(): kiwi = Kiwi(load_typo_dict=False) assert len(kiwi.add_re_rule("EF", r"요$", "용", score=-1)) > 0 res, score = kiwi.analyze("했어용! 하잖아용! 할까용? 좋아용!")[0] - assert score == oscore - 4 + assert abs(score - (oscore - 4)) < 1e-3 def test_add_pre_analyzed_word(): kiwi = Kiwi()