Zodiacal data parsing
Level: Advanced (score: 4)
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 🕒)
In this Bite we will write tests for a module that parses data from Zodiacal / The Zodiac API. See the CODE TO TEST tab below.
- The
get_signs
function is used in thesigns
fixture that has been provided in the template. You can use it in your tests by passing it into your test functions (read our article if you have not used them yet). - Write code to test
get_sign_with_most_famous_people
,signs_are_mutually_compatible
andget_sign_by_date
. - As with all our test Bites, your test code will be tested for: 1. correct syntax, 2.
pytest
passes all tests, 3. 100% coverage, 4. 100% mutation score (mutpy
)
Good luck and keep calm and code in Python + pytest
! If you have ideas and/or open source code that can serve us for more test Bites, please hit us up here or in our community ...