Pybites Logo

Make mutpy's output more digestible

Level: Intermediate (score: 3)

Another real world scenario. When we started using MutPy for our test Bites, we quickly learned that the verbose output of -m (--show-mutants) can be hard to digest. So we wrote some code to mute the successes ("killed mutants").

In this Bite you will write a function to accomplish the same.

Complete filter_killed_mutants. In its docstring we show an example of how a killed mutant looks. We are only interested in "survived" mutants so "incompetent" mutants should be filtered out too (we consider those "successes" because they don't affect the total mutation score).

Check the type hinting what should get in and out of the function. You can also look at the tests.

This is a typical data parsing we think is useful to add to your toolkit. Have fun and keep it Python!