Skip to content

Conversation

mdbrnowski
Copy link
Contributor

There is a problem in all ...Ballot initializations: the name and meta fields are lost. These fields are correctly passed to Ballot.__init__(), but they are missing in Abstract...Ballot.__init__(), which resets them.

For example, the code:

from pabutools.election.instance import get_random_instance
from pabutools.election.profile import get_random_approval_profile
instance = get_random_instance(3, 1, 10)
profile = get_random_approval_profile(instance, 3)
for ballot in profile:
    print(ballot.name)

currently prints three empty lines.

After this PR, it correctly prints:

RandomAppBallot 0
RandomAppBallot 1
RandomAppBallot 2

@mdbrnowski
Copy link
Contributor Author

The tests fail due to an HTTPError -- this seems to be an issue with pabulib.org [url].

@motzarcik motzarcik merged commit a0e1312 into COMSOC-Community:main Sep 13, 2025
0 of 5 checks passed
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