Add tests to verify the PR's before they can be merged
MasterMedo opened this issue · comments
typetest
should be tested end-to-end, I have no idea how to do that at the time of writing, but I know it needs to be done.
typetest-analyse
should be unit tested, every function, also testing edge cases, e.g. file doesn't exist.
Tests should be placed in the /test/
repository, so they are not shipped with the PyPI package.
Test ideas:
- test
typetest
draws the screen correctly on various terminals - test
typetest
draws the screen correctly on various terminals sizes - test
typetest
flags work correctly - test
typetest
writes the correct output form in various result files - test
typetest-analyse
prints error messages (e.g. when testing data is missing, not enough testing data, etc.) - test
typetest-analyse
plots with all matplotlib backends, we need a cross-platform solution - test
typetest-analyse
typing speed per test and duration check accuracy plot length (has to be the length of file)
regarding testing if the results files are read correctly
File reading of every file should be placed in typetest/utils.py
.
Those functions should be tested with in-memory objects, to test if the files are read correctly.
When testing typetest-analyse
mock test result files should be placed in /test/mock_results/
or a similar directory.
It makes the tests too verbose if every test contains in-memory test results.