JonnyHaystack / i3-resurrect

Simple solution to saving and restoring i3 workspaces
GNU General Public License v3.0
379 stars 19 forks source link

Improve code coverage #31

Open JonnyHaystack opened 5 years ago

JonnyHaystack commented 5 years ago

I need to add some more unit tests and get better coverage because right now it is really low (48%). It would be nice to get it to 70-80%.

Right now the problem is that a lot of the code isn't really testable because it's been left in the Click command methods. Most of this logic could be extracted out into more testable functions.

The module organisation also probably needs rethinking, because more and more stuff just ends up being dumped in the "util" module.

Note that most things which are not covered by unit tests are still covered by my tox tests, so overall the coverage is not as bad as it looks.