File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
import unittest
2
+
2
3
import connect
3
4
5
+
4
6
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0
5
7
6
8
testcases = [
100
102
]
101
103
102
104
103
- class SieveTest (unittest .TestCase ):
105
+ class ConnectTest (unittest .TestCase ):
104
106
def test_game (self ):
105
- for t in testcases :
106
- game = ConnectGame (t ["board" ])
107
+ for testcase in testcases :
108
+ game = connect . ConnectGame (testcase ["board" ])
107
109
winner = game .get_winner ()
108
- expected = t ["winner" ] if t ["winner" ] else "None"
110
+ expected = testcase ["winner" ] if testcase ["winner" ] else "None"
109
111
got = winner if winner else "None"
110
- self .assertEqual (winner , t ["winner" ],
112
+ self .assertEqual (winner , testcase ["winner" ],
111
113
"Test failed: %s, expected winner: %s, got: %s"
112
- % (t ["description" ], expected , got ))
114
+ % (testcase ["description" ], expected , got ))
113
115
114
116
115
117
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments