예제 #1
0
 def test_create_match_error(self):
     log = game_score.open_log('test.log')
     log = log[1:]
     match = game_score.create_match(log)
     self.assertEqual(match, config.ERROR_FILE_CONFIG)
예제 #2
0
 def test_final_score_error_on_log(self):
     log = game_score.open_log('log_with_error.log')
     match = game_score.create_match(log)
     result = game_score.final_score(match, log)
     self.assertEqual(result, config.ERROR_FILE_CONFIG)
예제 #3
0
 def test_create_match_from_game_score(self):
     log = game_score.open_log('test.log')
     match = game_score.create_match(log)
     id = log[0].split(' ')[5]
     self.assertEqual(id, match.id)
예제 #4
0
 def test_error_open_log(self):
     log = game_score.open_log('x' + 'test.log')
     self.assertEqual(log, config.ERROR_OPEN_FILE)
예제 #5
0
 def test_open_log(self):
     log = game_score.open_log('test.log')
     self.assertEqual(type(log), list)
예제 #6
0
 def test_final_score(self):
     log = game_score.open_log('complete_match.log')
     match = game_score.create_match(log)
     result = game_score.final_score(match, log)
     self.assertEqual(result, 'Success')
예제 #7
0
 def create_match(self):
     log = game_score.open_log('test.log')
     match = game_score.create_match(log)
     return match