mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-31 23:17:38 -08:00
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
This commit is contained in:
11
84_Super_Star_Trek/python/test_superstartrek.py
Normal file
11
84_Super_Star_Trek/python/test_superstartrek.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user