Exemple #1
0
def main(stdscr):
    tourny = None
    if len(sys.argv) > 1:
        tourny = Tournament.fromFile(sys.argv[1])

    interface = Interface(stdscr, tourny)
    interface.run()
Exemple #2
0
def test_pickle():
    tourney = Tournament(['a', 'b'], SingleEliminationGenerator())
    tourney.setScore(0, (1, 0), 0)

    tourney.saveToFile('test.pkl')

    tourney2 = Tournament.fromFile('test.pkl')
    return set(tourney.getTeams()) == set(tourney2.getTeams()) \
        and tourney2.roundCompleted()