MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / test_makeMove

Function test_makeMove

tests/test_mancala.py:20–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_makeMove():
21 gameBoard = mancala.getNewBoard()
22 result = mancala.makeMove(gameBoard, '1', 'C')
23 assert result == '1'
24 assert gameBoard == {'1': 1, '2': 0, 'A': 4, 'B': 4, 'C': 0, 'D': 5, 'E': 5, 'F': 5, 'G': 4, 'H': 4, 'I': 4, 'J': 4, 'K': 4, 'L': 4}
25
26 result = mancala.makeMove(gameBoard, '1', 'D')
27 assert result == '2'
28 assert gameBoard == {'1': 2, '2': 0, 'A': 4, 'B': 4, 'C': 0, 'D': 0, 'E': 6, 'F': 6, 'G': 4, 'H': 4, 'I': 4, 'J': 4, 'K': 5, 'L': 5}
29
30
31def test_quit():

Callers

nothing calls this directly

Calls 1

makeMoveMethod · 0.80

Tested by

no test coverage detected