コード例 #1
0
ファイル: test.py プロジェクト: antogruz/championship
def main():
    #Tester().runTests()

    team_names = ["Jaune", "Blanc", "Bleu", "Vert", "Noir", "Orange", "Rouge"]
    print("Real")
    championship = createChampionship(FranckGame(), team_names)

    for name in team_names:
        print(name, count_roles(FranckGame(), championship, name),
              count_different_opponents(championship, name))

    print_championship(championship)
コード例 #2
0
ファイル: test.py プロジェクト: antogruz/championship
 def testThatAllGamesDone(self):
     championship = createChampionship(
         FranckGame(), ["a", "b", "c", "d", "e", "f", "g", "h"])
     assert_equals(7, count_different_opponents(championship, "a"))
コード例 #3
0
ファイル: test.py プロジェクト: antogruz/championship
 def testReferees(self):
     assert_similars([["a", "b", "c"], ["c", "a", "b"], ["b", "c", "a"]],
                     createChampionship(RefGame(), ["a", "b", "c"]))
コード例 #4
0
ファイル: test.py プロジェクト: antogruz/championship
 def testEightTeams(self):
     assert_equals(28, len(createChampionship(SimpleGame(), ["a"] * 8)))
コード例 #5
0
ファイル: test.py プロジェクト: antogruz/championship
 def testThreeTeams(self):
     assert_similars([["a", "b"], ["c", "a"], ["b", "c"]],
                     createChampionship(SimpleGame(), ["a", "b", "c"]))
コード例 #6
0
ファイル: test.py プロジェクト: antogruz/championship
 def testTwoTeams(self):
     assert_contains("blue",
                     createChampionship(SimpleGame(), ["blue", "red"])[0])
コード例 #7
0
ファイル: test.py プロジェクト: antogruz/championship
 def testNoTeams(self):
     assert_equals([], createChampionship(SimpleGame(), []))