keewis / blackdoc

run black on documentation code snippets
https://blackdoc.readthedocs.io
MIT License
47 stars 4 forks source link

add integration tests for the CLI #46

Open keewis opened 4 years ago

keewis commented 4 years ago

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.

keewis commented 2 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.