fix: mark answer in ReviewSession.process_answer instead of Question.solve #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The logic for marking whether a question was correct or incorrect was split between
ReviewSession.process_answer
andQuestion.solve
. If it was Correct or Incorrect, the question was mutated insolve
but otherwise it was resolved inprocess_answer
. This was causing a problem with the double_check feature. Because even if the result was changed inprocess_answer
since it was already marked incorrect in 'solve' it was submitted to wanikani as incorrect.The first commit adds tests for double check. They fail on master (#66).
The second commit moves the CORRECT and INCORRECT handling into
process_answer
. This way, the INCORRECT is handled almost the same way as A_BIT_OFF.This did break the test
test_card_is_solved
since now the card is only marked solved afterprocess_answer
. Adding a session and processing each answer made that test match the new way of marking answers.fixes #66