Add unit tests and CI workflow#15
Conversation
rod-glover
left a comment
There was a problem hiding this comment.
Wow, very nice work! This repo is much the better for these tests.
One question: What advantages do you think we get by using test classes rather than flat collections of functions?
|
|
||
| @pytest.fixture | ||
| def client(app): | ||
| return app.test_client() |
There was a problem hiding this comment.
Test fixtures are usually stored in conftest.py files. Any reason not to do that here?
There was a problem hiding this comment.
That's a good point. I left them in this file to keep things readable, since they’re only used here.
If our fixtures end up being reused elsewhere, we can move them to conftest.py.
Using test classes gives additional context in our logs. While not strictly necessary here, it becomes useful if we add tests for other classes in the same file, as it scopes test failures more clearly. Context is also factored out into the class, shortening test names. |
Add CI workflow and unit tests for Translation, helpers, and app endpoints.
Resolves #6