Files
basic-computer-games/84_Super_Star_Trek/python/test_superstartrek.py
Martin Thoma 1b1d50986b Python: Add type annotations to all 'print' functions (#662)
* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
2022-03-21 10:41:14 +01:00

12 lines
262 B
Python

import io
import pytest
from superstartrek import main
def test_main(monkeypatch, capsys):
monkeypatch.setattr("sys.stdin", io.StringIO("NAV\n1\n1\nSRS\nXXX\nXXX\n"))
with pytest.raises(SystemExit):
main()
# captured = capsys.readouterr()