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

Function test_displayBoard

tests/test_chancecheckers.py:15–33  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected