-
Notifications
You must be signed in to change notification settings - Fork 105
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 testing to the project #150
Comments
Tests would be appreciated for sure. |
after reading this blog: I decided to try pytest due it's simplicity writing tests and bundled with python. Some tests are added, just to have the development aid of testing certain part of the code: There's no structure there. Ideally should have a common library that all tests can use. The object mocking should likely use something existing. Anyway, to run the tests: pytest path/to/test/file.py
# or
python3 -m pytest path/to/test/file.py |
The tests I wrote for trakt_list_util are using mockdata from pytrakt project. |
not sure what the mockdata is, could not find what loads those json from quick look. but pytrakt also seem to use pytest as rest runner. |
It is fake data so we can test each and every function of our code without connecting to a real trakt/plex account. |
@twolaw I mean I don't know and on quick look did not understand how the files in |
It is loaded with conftest.py as a Mock object to fake all trakt answers. Very smart. |
Yes, found it, already using a similar approach: |
Yes it's good. |
ref Testing Click Applications |
@chrillep thanks, but I don't think we should test e2e here, but rather unittest algorithms. |
With logic being isolated in newer PR's, it should make it possible to do unit and e2e testing.
Here's some related projects, which start PMS to use for testing:
The text was updated successfully, but these errors were encountered: