Пример #1
0
 def testScoringCut(self):
     """Test a score that that is wrong at the very beginning."""
     score=tournament.calc_score(self.ENCODED, 1096950138368751438)
     # Missed one of the first ones.  Loses a point at each level.
     # perfect - 32 - 16 - 8 - 4 - 2 - 1
     self.assertEquals(129, score)
Пример #2
0
 def testScoringImperfect(self):
     """Test a score that was perfect until the last game."""
     score=tournament.calc_score(self.ENCODED, self.ENCODED & (~3))
     # perfect - 32
     self.assertEquals(160, score)
Пример #3
0
 def testScoringPerfect(self):
     """Test scoring with a perfect score."""
     score=tournament.calc_score(self.ENCODED, self.ENCODED)
     # Perfect score == 32 * 6
     self.assertEquals(192, score)
Пример #4
0
 def testScoringCut(self):
     """Test a score that that is wrong at the very beginning."""
     score = tournament.calc_score(self.ENCODED, 1096950138368751438)
     # Missed one of the first ones.  Loses a point at each level.
     # perfect - 32 - 16 - 8 - 4 - 2 - 1
     self.assertEquals(129, score)
Пример #5
0
 def testScoringImperfect(self):
     """Test a score that was perfect until the last game."""
     score = tournament.calc_score(self.ENCODED, self.ENCODED & (~3))
     # perfect - 32
     self.assertEquals(160, score)
Пример #6
0
 def testScoringPerfect(self):
     """Test scoring with a perfect score."""
     score = tournament.calc_score(self.ENCODED, self.ENCODED)
     # Perfect score == 32 * 6
     self.assertEquals(192, score)