(capsys)
| 14 | |
| 15 | |
| 16 | def 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 | |
| 37 | def test_prevCol(): |
nothing calls this directly
no outgoing calls
no test coverage detected