Example #1
0
	def testCgetinfo2 (self):
		c = Candidate("Mitt Romney", 1)
		c.count = 1
		c.ballots.append([1, 2, 3])
		self.assertEqual(c.getinfo(), ('Mitt Romney', 1, 1, [[1, 2, 3]], True))
Example #2
0
	def testCgetinfo3 (self):
		c = Candidate("Glenn Downing", 500)
		c.count = 2
		c.ballots.append([1, 2, 3])
		c.ballots.append([1, 3, 2])
		self.assertEqual(c.getinfo(), ('Glenn Downing', 500, 2, [[1, 2, 3], [1, 3, 2]], True))
Example #3
0
	def testCgetinfo1 (self):
		c = Candidate("Barack Obama", 1)
		c.count = 1
		c.ballots.append(1)
		c.running = False
		self.assertEqual(c.getinfo(), ('Barack Obama', 1, 1, [1], False))