-
-
Notifications
You must be signed in to change notification settings - Fork 318
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 some tests #1395
Add some tests #1395
Conversation
This reverts commit a6c2863.
I would wait for #1403 as it changes Legacy quite a lot and some of those code may already have changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at the changes since my last review. Everything fine so far except the one open comment which can only be closed after #1351. Except from that I am fine with the PR.
However, it would be possible to even improve on this PR further (not I "must", only something which crossed my mind). The tests for the search feature only check whether the uploaded photo is found. There are no negative tests, i.e. that an uploaded photo which does not match the search criteria is not found. This means a silly implementation of the search feature which always simply returns the whole DB without actually searching anything would also pass the tests. Hence, what I would have done is to upload two photos in each of the tests, e.g. the Night photo and the Mongolia photo, search and check that the search result only contains one element and the correct element. But I also understand that this might be out of the scope of this PR. I am already happy that we have more tests.
Added negative tests myself in e5d042a. |
@ildyria I assume you are speaking about the changes introduces by this PR in f732f5d? I am not sure why @qwerty287 made this part of this PR. To me these changes seem unrelated to the purpose of this PR. I assume if f732f5d was reverted, then the only changes introduced by this PR are more tests and the PR is fine for merge, right? |
@qwerty287 Do you mind to revert f732f5d? I am not sure if this should be part of this PR at all and it will be mostly outdated after #1403. Without this commit, we could merge this PR right away. |
This is not related to the tests. But I noticed that these methods will always return the same result. The removed methods |
Try to increase test coverage by adding some (partially useless) tests.