Skip to content

Commit e585f2f

Browse files
committed
use round instead of pytest approx
1 parent 42ec994 commit e585f2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_fitresults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ def test_get_results_dictionary(build_recipe_one_contribution):
167167
# If the expected value is a tuple, check each element with approx
168168
assert len(actual_value) == len(expected_value)
169169
for actual_val, expected_val in zip(actual_value, expected_value):
170-
assert actual_val == pytest.approx(expected_val, rel=1e-3)
170+
assert round(actual_val, 3) == round(expected_val, 3)
171171
else:
172172
# If the expected value is not a tuple, check with approx
173-
assert actual_value == pytest.approx(expected_value, rel=1e-3)
173+
assert round(actual_value, 3) == round(expected_value, 3)
174174

175175

176176
def test_resultsDictionary(build_recipe_one_contribution, tmp_path):

0 commit comments

Comments
 (0)