Skip to content

Add d'Hondt test case for the 2024 San Marino election - #54

Merged
kbaird merged 1 commit into
mainfrom
san-marino-2024
Oct 15, 2026
Merged

kbaird merged 1 commit into
mainfrom
san-marino-2024

Conversation

@kbaird

@kbaird kbaird commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Replaces the TODO in test/jefferson_dhondt_test.erl with a test case for the 2024 San Marino general election.

San Marino elects all 60 members of the Grand and General Council by d'Hondt in a single national constituency, with an electoral threshold of 0.4% per party running (here at its 5% maximum). The threshold excludes Solidary Democracy (4.69%) while RETE (5.07%) qualifies, and the seven qualifying lists' published seats are reproduced exactly.

The test asserts the seven lists' seats and a ranked-list count of 7 (documenting the exclusion). It cannot assert demos => 0 directly because assert_seats/3 looks up parties in the threshold-filtered rankings map.

Verification:

  • rebar3 eunit — 133 tests, 0 failures
  • rebar3 dialyzer — no warnings
  • ./elvis rock — exit 0

@kbaird
kbaird merged commit f375efe into main Oct 15, 2026
6 checks passed
@kbaird
kbaird deleted the san-marino-2024 branch October 15, 2026 22:52
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.

1 participant