Aha: The unit test should test all expected error messages.
Each tool (flake8, mypy, pyflakes, pylint, and python) uses a different format for its error message. Tests should cover each.
Similarly, the recently-improved unit test for LM.scanOptions tests all variations of Leo's command-line options, both valid and invalid.
Aha: All error messages (regardless of the tool that generates the test) contain the full absolute path to the erroneous file.
Summary
- Working on a unit test is a great way to get into action.
- TDD works for study as well as development and testing.
Let's call this approach TDS: test-driven study.
- 100% code coverage is not always enough.
Tests should cover all options.
Edward