-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 unit tests #3678
base: main
Are you sure you want to change the base?
Add some unit tests #3678
Conversation
Covers most of the cases encountered in ankitects#3639
Not sure why is the test failing. In the following test, the left side should produce 2 items. But CI failure shows 3 items on left side. anki/rslib/src/scheduler/fsrs/params.rs Lines 602 to 616 in f2463c5
|
Makes the test more robust.
@L-M-Sherlock, can you please have a look when you are free? |
The output of CI showed that the test was failed:
|
When training, the first FSRS item is removed. That's why none of the other tests includes it. Co-authored-by: Jarrett Ye <[email protected]>
Thanks @L-M-Sherlock |
rslib/src/scheduler/fsrs/params.rs
Outdated
@@ -636,4 +689,20 @@ pub(crate) mod tests { | |||
convert(revlogs, false) | |||
); | |||
} | |||
|
|||
#[test] | |||
fn even_if_no_learning_steps_ignore_reviews_before_during_reviewing() { |
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.
Just a naming nitpick:
fn even_if_no_learning_steps_ignore_reviews_before_during_reviewing() { | |
fn ignore_reviews_before_during_reviewing_even_if_no_learning_steps() { |
Hope that you like the wording now. |
Covers most of the cases encountered in #3639