-
Notifications
You must be signed in to change notification settings - Fork 438
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
Python test coverage needs improvement #755
Comments
To elaborate, the python unit tests are in isso/tests/. To run Isso's unit tests,
Any contributors experienced in python or unit testing are welcome to help out! |
Maybe we could start by add a linter like flake8 to improve code reliability? If you want, I can push some PR. |
Code linting and enforcing style seems like a good idea (and I'd welcome a PR to add that), but it is unrelated to better tests. |
Woo @jelmer, you are quite harsh! |
My apologies, I didn't mean to come across as harsh. I'm not disagreeing with you about the usefulness of a linter in general and its potential contributions to code quality. But they're orthogonal, and a linter won't give us significantly more confidence merging new PRs. |
No worries, I get it that we agree. I've pushed a PR. |
@Guts we already have flake8 (via |
As a reference point, this is the current coverage: $ coverage report --omit='*/tests/*'
Name Stmts Miss Cover
-----------------------------------------------
isso/__init__.py 159 81 49%
isso/config.py 84 14 83%
isso/core.py 69 24 65%
isso/db/__init__.py 66 6 91%
isso/db/comments.py 135 19 86%
isso/db/preferences.py 17 0 100%
isso/db/spam.py 40 2 95%
isso/db/threads.py 15 0 100%
isso/dispatch.py 39 39 0%
isso/ext/__init__.py 10 0 100%
isso/ext/notifications.py 149 99 34%
isso/migrate.py 193 27 86%
isso/run.py 7 7 0%
isso/utils/__init__.py 66 11 83%
isso/utils/hash.py 58 1 98%
isso/utils/html.py 50 3 94%
isso/utils/http.py 35 24 31%
isso/utils/parse.py 42 2 95%
isso/views/__init__.py 35 8 77%
isso/views/comments.py 491 90 82%
isso/wsgi.py 87 17 80%
-----------------------------------------------
TOTAL 1847 474 74% |
The test coverage for isso's Python code is very spotty; in order to be confident when making changes and adding features, we should make sure that all code at least has some degree of coverage.
The text was updated successfully, but these errors were encountered: