9 lines
254 B
Python
9 lines
254 B
Python
from numpy.testing import assert_allclose
|
|
import pytest
|
|
from logistic_fit import fit_r
|
|
from logistic import iterate_f
|
|
|
|
def test_logistic_fit(x0=0.3, r=3.421, it=23):
|
|
xs = iterate_f(it, x0, r)
|
|
r_fitted = fit_r(xs)
|
|
assert_allclose(r, r_fitted)
|