Skip to content

Commit ad82337

Browse files
committed
connect: Fix test file
1 parent 3ce3c99 commit ad82337

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

exercises/connect/connect_test.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import unittest
2+
23
import connect
34

5+
46
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0
57

68
testcases = [
@@ -100,16 +102,16 @@
100102
]
101103

102104

103-
class SieveTest(unittest.TestCase):
105+
class ConnectTest(unittest.TestCase):
104106
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"])
107109
winner = game.get_winner()
108-
expected = t["winner"] if t["winner"] else "None"
110+
expected = testcase["winner"] if testcase["winner"] else "None"
109111
got = winner if winner else "None"
110-
self.assertEqual(winner, t["winner"],
112+
self.assertEqual(winner, testcase["winner"],
111113
"Test failed: %s, expected winner: %s, got: %s"
112-
% (t["description"], expected, got))
114+
% (testcase["description"], expected, got))
113115

114116

115117
if __name__ == '__main__':

0 commit comments

Comments
 (0)