예제 #1
0
 def test_candidate8(self):
     a = candidate('m')
     b = [ballot([1, 2, 3]), ballot([2, 1, 3]), ballot([2, 1, 4])]
     for i in range(3):
         a.add_ballot(b[i])
     for i in range(len(a.ballot_list())):
         assert str(b[i]) == str(a.ballot_list()[i])
예제 #2
0
 def test_candidate8(self):  
   a = candidate('m')
   b = [ballot([1,2,3]),ballot([2,1,3]),ballot([2,1,4])]
   for i in range(3):
     a.add_ballot(b[i])
   for i in range(len(a.ballot_list())):
     assert str(b[i]) == str(a.ballot_list()[i])
예제 #3
0
 def test_candidate7(self):
   a = candidate('Lando Calrissiam')
   b = ballot([1])
   for i in range(5):
     a.add_ballot(b)
   for item in a.ballot_list():
     assert str(item) == str([1])
예제 #4
0
 def tests_ballot9(self):
   a = ballot([1,2,3,4,5,6])
   a.index_up()
   a.index_up()
   a.index_up()
   a.index_up()
   assert a.index == 4
예제 #5
0
 def tests_ballot9(self):
     a = ballot([1, 2, 3, 4, 5, 6])
     a.index_up()
     a.index_up()
     a.index_up()
     a.index_up()
     assert a.index == 4
예제 #6
0
 def test_candidate7(self):
     a = candidate('Lando Calrissiam')
     b = ballot([1])
     for i in range(5):
         a.add_ballot(b)
     for item in a.ballot_list():
         assert str(item) == str([1])
예제 #7
0
 def test_ballot2(self):
     a = ballot([1])
     assert str(a) == str([1])
예제 #8
0
 def test_ballot8(self):
   a = ballot([1,2,3])
   a.index_up()
   a.index_up()
   assert a.index == 2
예제 #9
0
 def tests_ballot6(self):
   a = ballot()
   assert a.vote() == 0 
예제 #10
0
 def test_ballot5(self):
   a = ballot([1,2,3])
   a.index_up()
   a.index_up()
   assert a.vote() == 3
예제 #11
0
 def test_ballot4(self):
   a = ballot([1,2,3,4,5,6])
   a.index_up()
   assert a.vote() == 2
예제 #12
0
 def test_ballot3(self):
   a = ballot([])
   assert str(a) == str([])
예제 #13
0
 def test_ballot2(self):
   a = ballot([1])
   assert str(a) == str([1])
예제 #14
0
 def test_ballot4(self):
     a = ballot([1, 2, 3, 4, 5, 6])
     a.index_up()
     assert a.vote() == 2
예제 #15
0
 def test_candidate1(self):
   a = candidate('Adam')
   a.add_ballot(ballot())
   assert(a.vote_tot() == 1)    
예제 #16
0
 def test_candidate2(self):
     a = candidate('Branfordington')
     a.add_ballot(ballot())
     a.add_ballot(ballot())
     a.add_ballot(ballot())
     assert (a.vote_tot() == 3)
예제 #17
0
 def test_candidate1(self):
     a = candidate('Adam')
     a.add_ballot(ballot())
     assert (a.vote_tot() == 1)
예제 #18
0
 def test_ballot8(self):
     a = ballot([1, 2, 3])
     a.index_up()
     a.index_up()
     assert a.index == 2
예제 #19
0
 def tests_ballot6(self):
     a = ballot()
     assert a.vote() == 0
예제 #20
0
 def test_ballot5(self):
     a = ballot([1, 2, 3])
     a.index_up()
     a.index_up()
     assert a.vote() == 3
예제 #21
0
 def test_candidate2(self):
   a = candidate('Branfordington')
   a.add_ballot(ballot())
   a.add_ballot(ballot())
   a.add_ballot(ballot()) 
   assert(a.vote_tot() == 3)
예제 #22
0
 def test_ballot3(self):
     a = ballot([])
     assert str(a) == str([])
예제 #23
0
 def test_ballot1(self):
   a = ballot([1,2,3])
   assert str(a) == str([1,2,3])
예제 #24
0
 def test_ballot1(self):
     a = ballot([1, 2, 3])
     assert str(a) == str([1, 2, 3])