remove round from `fuzz.token_sort_ratio(str1, str2)` call

pull/1/head
Emmanuelle Vargas-Gonzalez 2020-07-08 11:02:56 -04:00
parent 457085a115
commit bf66744db3
2 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ def partial_string_based(str1, str2):
"""
from rapidfuzz import fuzz
result = round(fuzz.token_sort_ratio(str1, str2))
result = fuzz.token_sort_ratio(str1, str2)
logger.debug("--\t\tpartial_string_based '%s' '%s'\tresult: '%s'", str1, str2, result)
return result / 100.0

View File

@ -787,7 +787,7 @@ def test_semantic_equivalence_prop_scores():
tool2 = stix2.v21.Tool(id=TOOL_ID, **TOOL2_KWARGS)
stix2.Environment().semantically_equivalent(tool1, tool2, prop_scores)
assert len(prop_scores) == 4
assert round(prop_scores["matching_score"], 1) == 8.8
assert round(prop_scores["matching_score"], 1) == 8.9
assert round(prop_scores["sum_weights"], 1) == 100.0