Skip to content
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

check correctness of get_preferred_songs function #680

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

BeritJanssen
Copy link
Collaborator

This branch adds a test to check that the information about the "most liked" songs presented to a participant in the musical preferences experiment are indeed those with the lowest score in the database. As tests should, this still showed some flaws in the logic, which - as far as the test can tell - are now fixed.

Copy link
Contributor

@drikusroor drikusroor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I approve, but I'm not sure if I completely understand. How does this test the correctness? Are you first saving the songs in random/inversed score order and do you then check if the lowest scored song is the first song in the list when you fetch it?

@BeritJanssen
Copy link
Collaborator Author

The results are created in the order of sections (ordered alphabetically), with decreasing scores. You are right that the test might either document this, or (better) explicitly order the sections before result creation.

@BeritJanssen BeritJanssen merged commit a43f2c3 into develop Dec 21, 2023
9 checks passed
@BeritJanssen BeritJanssen deleted the bugfix/music-preferences-score branch December 21, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants