Open keewis opened 4 years ago
the code should definitely be split up into separate modules such that testing becomes much easier: while it is possible to test CLI, this is really tedious. If, instead, we had a function that does the conversion, one that compiles the report, and ones that parse the CLI args, the result might be much cleaner.
We could also use hypothesis
for this, which might help catch a lot of bugs.
Right now, the test suite contains only unit tests, leaving the code in
__main__.py
untested. That code should be moved to a different module and covered by integration tests.