Пример #1
0
 def test_two_candidate(self):
     self.assertEqual(self.method(socialchoice.PreferenceSchedule({'ABC': 1, 'BCA': 2})).winner, 'B')
Пример #2
0
 def test_math_club_election(self):
     self.assertEqual(self.method(socialchoice.PreferenceSchedule(math_club_election)).winner, 'D')
Пример #3
0
 def test_kingsburg_mayoral_election(self):
     self.assertEqual(self.method(socialchoice.PreferenceSchedule({'ABCDE': 93, 'BDECA': 44, 'CAEBD': 10, 'CEBAD': 30, 'DCEAB': 42, 'EDCBA': 81})).winner, 'E')
Пример #4
0
 def test_tsu_marching_band(self):
     self.assertEqual(self.method(socialchoice.PreferenceSchedule({'RHFOS': 49, 'HSOFR': 48, 'FHSOR': 3})).winner, 'R')