(capsys)
| 59 | |
| 60 | |
| 61 | def test_main(capsys): |
| 62 | # Test winning a game: |
| 63 | sys.stdin = io.StringIO('ab\nac\nbc\nab\nca\ncb\nab\nac\nbc\nba\nca\nbc\nab\nac\nbc\nab\nca\ncb\nab\nca\nbc\nba\nca\ncb\nab\nac\nbc\nab\nca\ncb\nab\n') |
| 64 | with pytest.raises(SystemExit): |
| 65 | towerofhanoi.main() |
| 66 | captured = capsys.readouterr() |
| 67 | assert 'You have solved the puzzle! Well done!' in captured.out |
| 68 | |
| 69 | |
| 70 | def test_displayDisk(capsys): |
nothing calls this directly
no outgoing calls
no test coverage detected