Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions testsuite/MDAnalysisTests/analysis/test_persistencelength.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import matplotlib
import matplotlib.pyplot as plt

from numpy.testing import assert_almost_equal, assert_equal
from numpy.testing import assert_equal

from MDAnalysisTests.datafiles import Plength, TRZ_psf, TRZ

Expand Down Expand Up @@ -73,10 +73,10 @@ def test_run(self, p_run):
assert len(p_run.results.bond_autocorrelation) == 280

def test_lb(self, p_run):
assert_almost_equal(p_run.results.lb, 1.485, 3)
assert p_run.results.lb == pytest.approx(1.485, abs=1e-3)

def test_fit(self, p_run):
assert_almost_equal(p_run.results.lp, 6.504, 3)
assert p_run.results.lp == pytest.approx(6.504, abs=1e-3)
assert len(p_run.results.fit) == len(
p_run.results.bond_autocorrelation
)
Expand Down Expand Up @@ -124,7 +124,7 @@ def test_fit_noisy(self):

a = polymer.fit_exponential_decay(self.x, y2)

assert_almost_equal(a, self.a_ref, decimal=3)
assert a == pytest.approx(self.a_ref, abs=1e-3)
# assert np.rint(a) == self.a_ref


Expand Down
Loading