Pybites Logo

Write tests for fibonacci

Level: Beginner (score: 2)

We moved from mutpy (<= 3.7) to mutatest (3.12 📈) for test Bites.

First we check if you have 90% test coverage, then we inject some mutations into the code to see if your tests catch them. 🤯

Good luck 🔥 💪 (please be patient 🙏 - it can take a few seconds to run the tests 🕒)

Our first Test Bite! The concept is simple: to pass a Test Bite, you write tests for the program under the "Code to Test" tab.

We run pytest-cov and mutatest against your code to see if your tests are strong enough. 

To kick this off we have you write some tests for fib which generates a Fibonacci sequence.

Note that we use the functool.cache decorator so we can also test higher numbers without timing out. 

Good luck and let us know if you have any feedback.