Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)