Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to verify the PR's before they can be merged #37

Open
7 tasks
MasterMedo opened this issue Oct 27, 2021 · 0 comments
Open
7 tasks

Add tests to verify the PR's before they can be merged #37

MasterMedo opened this issue Oct 27, 2021 · 0 comments

Comments

@MasterMedo
Copy link
Owner

MasterMedo commented Oct 27, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant