(cur)
| 145 | |
| 146 | |
| 147 | def serialize_tournament(cur): |
| 148 | index_team_info(cur) |
| 149 | |
| 150 | tournament = {} |
| 151 | tournament['tournament'] = TOURNAMENT_NAME |
| 152 | tournament['rounds'] = [] |
| 153 | |
| 154 | cur.execute('SELECT MAX(round) FROM {};'.format(TABLE_NAME)) |
| 155 | max_round = cur.fetchone()[0] |
| 156 | for round_num in range(0, max_round + 1): |
| 157 | tournament['rounds'].append(serialize_round(cur, round_num)) |
| 158 | |
| 159 | return tournament |
| 160 | |
| 161 | |
| 162 | if __name__ == '__main__': |
no test coverage detected