Skip to content

Commit

Permalink
UWI test (#440)
Browse files Browse the repository at this point in the history
* add UWI test files

* add an additional test to validate my fix of #397

* use a better name for the first test
  • Loading branch information
tarheel authored Mar 26, 2020
1 parent ed3410c commit ebdfe0c
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 0 deletions.
54 changes: 54 additions & 0 deletions multi_seat_uwi_test/multi_seat_uwi_test_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"tabulatorVersion" : "TEST",
"outputSettings" : {
"contestName" : "Multi-Seat UWI Test",
"outputDirectory" : "output",
"contestDate" : "",
"contestJurisdiction" : "",
"contestOffice" : "",
"tabulateByPrecinct" : false,
"generateCdfJson" : false
},
"cvrFileSources" : [ {
"filePath" : "multi_seat_uwi_test_cvr.xlsx",
"firstVoteColumnIndex" : "2",
"firstVoteRowIndex" : "2",
"idColumnIndex" : "",
"precinctColumnIndex" : "",
"provider" : ""
} ],
"candidates" : [ {
"name" : "A",
"code" : "",
"excluded" : false
}, {
"name" : "B",
"code" : "",
"excluded" : false
}, {
"name" : "C",
"code" : "",
"excluded" : false
} ],
"rules" : {
"tiebreakMode" : "usePermutationInConfig",
"overvoteRule" : "exhaustImmediately",
"winnerElectionMode" : "standard",
"randomSeed" : "",
"numberOfWinners" : "2",
"multiSeatBottomsUpPercentageThreshold" : "",
"decimalPlacesForVoteArithmetic" : "4",
"minimumVoteThreshold" : "0",
"maxSkippedRanksAllowed" : "1",
"maxRankingsAllowed" : "max",
"nonIntegerWinningThreshold" : false,
"hareQuota" : false,
"batchElimination" : false,
"exhaustOnDuplicateCandidate" : false,
"treatBlankAsUndeclaredWriteIn" : false,
"overvoteLabel" : "",
"undervoteLabel" : "",
"undeclaredWriteInLabel" : "UWI",
"rulesDescription" : ""
}
}
Binary file added multi_seat_uwi_test/multi_seat_uwi_test_cvr.xlsx
Binary file not shown.
66 changes: 66 additions & 0 deletions multi_seat_uwi_test/multi_seat_uwi_test_expected_summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"config" : {
"contest" : "Multi-Seat UWI Test",
"date" : "",
"jurisdiction" : "",
"office" : "",
"threshold" : "6"
},
"results" : [ {
"round" : 1,
"tally" : {
"A" : "6",
"B" : "3",
"C" : "2",
"UWI" : "4"
},
"tallyResults" : [ {
"elected" : "A",
"transfers" : { }
} ]
}, {
"round" : 2,
"tally" : {
"A" : "6.0000",
"B" : "3",
"C" : "2",
"UWI" : "4"
},
"tallyResults" : [ {
"eliminated" : "UWI",
"transfers" : {
"exhausted" : "4"
}
} ]
}, {
"round" : 3,
"tally" : {
"A" : "6.0000",
"B" : "3",
"C" : "2"
},
"tallyResults" : [ {
"eliminated" : "C",
"transfers" : {
"exhausted" : "2"
}
} ]
}, {
"round" : 4,
"tally" : {
"A" : "6.0000",
"B" : "3"
},
"tallyResults" : [ {
"elected" : "B",
"transfers" : { }
} ]
}, {
"round" : 5,
"tally" : {
"A" : "6.0000",
"B" : "3.0000"
},
"tallyResults" : [ ]
} ]
}
50 changes: 50 additions & 0 deletions uwi_cannot_win_test/uwi_cannot_win_test_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"tabulatorVersion" : "TEST",
"outputSettings" : {
"contestName" : "UWI Test",
"outputDirectory" : "output",
"contestDate" : "",
"contestJurisdiction" : "",
"contestOffice" : "",
"tabulateByPrecinct" : false,
"generateCdfJson" : false
},
"cvrFileSources" : [ {
"filePath" : "uwi_cannot_win_test_cvr.xlsx",
"firstVoteColumnIndex" : "2",
"firstVoteRowIndex" : "2",
"idColumnIndex" : "",
"precinctColumnIndex" : "",
"provider" : ""
} ],
"candidates" : [ {
"name" : "A",
"code" : "",
"excluded" : false
}, {
"name" : "B",
"code" : "",
"excluded" : false
} ],
"rules" : {
"tiebreakMode" : "usePermutationInConfig",
"overvoteRule" : "exhaustImmediately",
"winnerElectionMode" : "standard",
"randomSeed" : "",
"numberOfWinners" : "1",
"multiSeatBottomsUpPercentageThreshold" : "",
"decimalPlacesForVoteArithmetic" : "4",
"minimumVoteThreshold" : "0",
"maxSkippedRanksAllowed" : "1",
"maxRankingsAllowed" : "max",
"nonIntegerWinningThreshold" : false,
"hareQuota" : false,
"batchElimination" : false,
"exhaustOnDuplicateCandidate" : false,
"treatBlankAsUndeclaredWriteIn" : false,
"overvoteLabel" : "",
"undervoteLabel" : "",
"undeclaredWriteInLabel" : "UWI",
"rulesDescription" : ""
}
}
Binary file added uwi_cannot_win_test/uwi_cannot_win_test_cvr.xlsx
Binary file not shown.
33 changes: 33 additions & 0 deletions uwi_cannot_win_test/uwi_cannot_win_test_expected_summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"config" : {
"contest" : "UWI Test",
"date" : "",
"jurisdiction" : "",
"office" : "",
"threshold" : "3"
},
"results" : [ {
"round" : 1,
"tally" : {
"A" : "3",
"B" : "1",
"UWI" : "5"
},
"tallyResults" : [ {
"eliminated" : "UWI",
"transfers" : {
"exhausted" : "5"
}
} ]
}, {
"round" : 2,
"tally" : {
"A" : "3",
"B" : "1"
},
"tallyResults" : [ {
"elected" : "A",
"transfers" : { }
} ]
} ]
}

0 comments on commit ebdfe0c

Please sign in to comment.