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
12 changes: 11 additions & 1 deletion test_logistic.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
from numpy.testing import assert_allclose

import pytest
from logistic import f

# Add here your test for the logistic map

@pytest.mark.parametrize('x, r, expected', [
(0.1, 2.2, 0.198),
(0.2, 3.4, 0.544),
(0.5, 2, 0.5)
])

def test_f_generic_cases(x, r, expected):
result = f(x, r)
assert_allclose(result, expected)


def test_f_corner_cases():
# Test cases are (x, r, expected)
Expand Down