From 32d23df0bf7f70b87f9663e4a22cd1c7f865b232 Mon Sep 17 00:00:00 2001 From: bab2min Date: Tue, 31 Oct 2023 19:59:16 +0900 Subject: [PATCH] fixed float comparison errors in `test_kiwipiepy.py` --- test/test_kiwipiepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()