Pybites Logo

Test code that parses json and ip ranges

Level: Intermediate (score: 3)

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 πŸ•’)

Another Test Bite, we ❀️them 😁- today you will write tests for IPv4Network (ipaddress module) and dataclass objects πŸ’ͺ.

Check out the ips module I wrote parsing a JSON file of IP ranges (ip-ranges.json) under CODE TO TEST, then write tests to get to 100% test coverage and a 100% mutation score.

Good luck and keep calm and code in Python 🐍 and pytest. Share your accomplishment upon completing the Bite 😎