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