mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-27 05:03:27 -08:00
* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
12 lines
262 B
Python
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()
|