def test_sm_import_and_export(): test_sm_export_filepath = Path(__file__).parent / 'poznan/poznan.re' tour = Tournament('Poznań 2018', 'GW', 'Poznań') tour.read_from_scrabble_manager(test_sm_export_filepath) with TemporaryDirectory() as tmpdir: tour.export_t(Path(tmpdir) / 'test_a.t') new_tour = Tournament('Poznań 2018', 'GW', 'Poznań') new_tour.read_from_t(Path(tmpdir) / 'test_a.t') new_tour.export_re(Path(tmpdir) / 'test_re.re') assert cmp(test_sm_export_filepath, Path(tmpdir) / 'test_re.re')
tour.export_lte('/home/adam/Downloads/test.lte') tour.export_nag('/home/adam/Downloads/test.nag') tour.export_smt('/home/adam/Downloads/test.smt') # games = tour.get_players_games(8) # print(games) # # for g in tour.games: # # print(g) # for p in tour.players: # print(p) newtour = Tournament('Poznań', 'Grzegorz', 'Poznań') newtour.read_from_scrabble_manager('/home/adam/Downloads/turnieje/Documents/kolobrzeg/kolobrzeg.re') for r in range(9, 12): newtour.export_t(f'/home/adam/code/tsh/samplekolobrzeg/a.t_{r}', last_round=r) newtour = Tournament('Poznań', 'Grzegorz', 'Poznań') newtour.read_from_scrabble_manager('/home/adam/Downloads/turnieje/Documents/jaworzno/jaworzno.re') for r in range(9, 12): newtour.export_t(f'/home/adam/code/tsh/samplekonojady2018/a.t_{r}', last_round=r) newtour = Tournament('Poznań', 'Grzegorz', 'Poznań') newtour.read_from_scrabble_manager('/home/adam/Downloads/turnieje/Poznan_2018_export/poznan.re') for r in range(10, 13): newtour.export_t(f'/home/adam/code/tsh/samplepoznan18/a.t_{r}', last_round=r) newtour = Tournament('LeMans', 'Grzegorz', 'Poznań') newtour.read_from_scrabble_manager('/home/adam/Downloads/turnieje/mp_lemans/lemans2017/lemans.re') for r in range(17, 24):