templates/python: fix type annotations

This commit is contained in:
DavHau
2023-07-21 13:48:37 +02:00
parent e806b5549d
commit ca044a078c
3 changed files with 7 additions and 5 deletions

View File

@@ -1,15 +1,17 @@
import sys
import pytest
import my_tool
def test_no_args(capsys):
def test_no_args(capsys: pytest.CaptureFixture) -> None:
my_tool.my_cli()
captured = capsys.readouterr()
assert captured.out.startswith("usage:")
def test_version(capsys, monkeypatch):
def test_version(capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(sys, "argv", ["", "--version"])
my_tool.my_cli()
captured = capsys.readouterr()