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

Function test_displayBoard

tests/test_checkers.py:16–34  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

14
15
16def test_displayBoard(capsys):
17 board = checkers.getNewBoard()
18 checkers.displayBoard(board)
19 captured = capsys.readouterr()
20
21 lines = [
22 ' A B C D E F G H',
23 ' +---+---+---+---+---+---+---+---+',
24 ' 1 | | x | | x | | x | | x | 1',
25 ' 2 | x | | x | | x | | x | | 2',
26 ' 3 | | x | | x | | x | | x | 3',
27 ' 4 | | | | | | | | | 4',
28 ' 5 | | | | | | | | | 5',
29 ' 6 | o | | o | | o | | o | | 6',
30 ' 7 | | o | | o | | o | | o | 7',
31 ' 8 | o | | o | | o | | o | | 8',
32 ]
33 for line in lines:
34 assert line in captured.out
35
36
37def test_prevCol():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected