-
Notifications
You must be signed in to change notification settings - Fork 5
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
Bug fix in ties #17
Bug fix in ties #17
Conversation
This fixes the first example, but not the others. Should I file a second bug or just list them here?
both produce:
|
Other bug fixed in latest commits. |
Would it make more sense to return sets instead of lists? For things like When writing tests, for instance, |
Correction on last commit: some test assertions were commented out and I also found a weird bug. If I run STAR_Test.py, all tests pass. But if I run pytest, 2 tests fail. It looks like the two ways of calling pytest result in different outputs. using |
If you start a new kernel and run STAR_Test.py again does it pass? pytest-dev/pytest#3143 (comment) Oh wait no you said pytest fails but running the file doesn't. Not sure why that would happen, will look later |
When I checkout 666aea1 I don't see any failures, just 7 test passing, whether running |
Co-authored-by: endolith <endolith@gmail.com>
So I tracked it down to the scores.argmax() line. Running the test the two different ways resulted in different outputs. I updated to not use it and make code more readable. |
That's strange, why would it behave differently when run different ways? |
When resolving ties we're extending the runoff candidates list with the tie winner. extend expects a list, so when the candidate names are strings it would break up the string.
Instead of ['Allison', 'Bill'] the runoff candidates would be ['Allison', 'B', 'i', 'l', 'l'] which causes the error later on found in #16