Page MenuHomePhabricator

Test tallier's addVote() function [M]
Closed, ResolvedPublic

Description

unit tests written thus far haven't tested addVote() but since meaningful record (vote) interpretation and processing happens with this function, we should test it. It's called by ElectionTallier, which is the aggregate tallier using single Tallier functions so as part of this ticket, we should decide whether to:

  1. Test in ElectionTallier (leaking Tallier information into the test)
  2. Test in Tallier using ElectionTallier (leaking ElectionTallier information into the test)
  3. Test in Tallier and stub out the processed record at the state addVote() is called

The following need this test:

  • HistogramRangeTallier.php
  • PairwiseTallier.php
  • PluralityTallier.php

(Schulze inherits from Plurality)

Event Timeline

ARamirez_WMF renamed this task from Test tallier's addVote() function to Test tallier's addVote() function [M].May 26 2021, 4:33 PM

Change 698797 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/SecurePoll@master] Test addVote in talliers

https://gerrit.wikimedia.org/r/698797

Change 698797 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Test addVote in talliers

https://gerrit.wikimedia.org/r/698797

dom_walden added a subscriber: dom_walden.

As this is testing old code which we can assume has no major problems, I will move this along without much review from me.