Skip to content

Commit

Permalink
Merge pull request #764 from haddocking/contmap-testdigits
Browse files Browse the repository at this point in the history
modif float comparisons in contact map tests
  • Loading branch information
VGPReys committed Dec 21, 2023
2 parents e8a63d9 + 00c8ac4 commit 18a5528
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_module_contmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ def test_moduloAB_errors():
def test_moduloAB_execution():
"""Test proper functioning of moduloAB()."""
moduloab = moduloAB(6.1035, 0, 2 * PI)
assert moduloab == 6.1035
assert np.isclose(moduloab, 6.1035, atol=0.001)
moduloab2 = moduloAB(7, 0, 2 * PI)
assert round(moduloab2, 4) == 0.7168
assert np.isclose(moduloab2, 0.7168, atol=0.001)
moduloab3 = moduloAB(3, 0, 2)
assert moduloab3 == 1

Expand Down Expand Up @@ -543,4 +543,4 @@ def test_make_ideogram_arc_moduloAB():
])
assert arc_positions.shape == excpected_output.shape
for i in range(nb_points):
assert arc_positions[i] == excpected_output[i]
assert np.isclose(arc_positions[i], excpected_output[i], atol=0.0001)

0 comments on commit 18a5528

Please sign in to comment.