diff --git a/superscore/client.py b/superscore/client.py index c1f0588..c01dd34 100644 --- a/superscore/client.py +++ b/superscore/client.py @@ -158,7 +158,7 @@ def search(self, *post) -> Generator[Entry, None, None]: for search_term in post: if not isinstance(search_term, SearchTerm): search_term = SearchTerm(*search_term) - if search_term.operator == 'like_with_tols': + if search_term.operator == 'isclose': target, rel_tol, abs_tol = search_term.value lower = target - target * rel_tol - abs_tol upper = target + target * rel_tol + abs_tol diff --git a/superscore/tests/test_client.py b/superscore/tests/test_client.py index 8bba73f..a5659e3 100644 --- a/superscore/tests/test_client.py +++ b/superscore/tests/test_client.py @@ -141,11 +141,11 @@ def test_find_config(sscore_cfg: str): def test_search(sample_client): results = list(sample_client.search( - ('data', 'like_with_tols', (4, 0, 0)) + ('data', 'isclose', (4, 0, 0)) )) assert len(results) == 0 results = list(sample_client.search( - SearchTerm(operator='like_with_tols', attr='data', value=(4, .5, 1)) + SearchTerm(operator='isclose', attr='data', value=(4, .5, 1)) )) assert len(results) == 4