#!/bin/sh # Prüft fib gegen die Spezifikation mit festen Testfällen. mkdir -p /checks cat > /checks/test_fib.py <<'PY' import sys sys.path.insert(0, "/work") import pytest from mathe import fib def test_werte(): assert [fib(n) for n in range(10)] == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] def test_gross(): assert fib(90) == 2880067194370816120 def test_negativ(): with pytest.raises(ValueError): fib(-1) PY cd /work && python3 -m pytest -q -p no:cacheprovider /checks/test_fib.py