2024-heraklion-testing-debu.../testing_project/test_logistic.py

17 lines
338 B
Python
Raw Normal View History

2024-08-26 13:54:13 +02:00
from numpy.testing import assert_allclose
from logistic import f
# Add here your test for the logistic map
def test_f_corner_cases():
# Test cases are (x, r, expected)
cases = [
(0, 1.1, 0),
(1, 3.7, 0),
]
for x, r, expected in cases:
result = f(x, r)
assert_allclose(result, expected)