mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 20:52:43 +00:00
fixed for mypy --strict testing
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
from pytest import MonkeyPatch
|
||||
|
||||
from blag.quickstart import get_input, quickstart
|
||||
|
||||
|
||||
def test_get_input_default_answer(monkeypatch):
|
||||
def test_get_input_default_answer(monkeypatch: MonkeyPatch) -> None:
|
||||
monkeypatch.setattr('builtins.input', lambda x: '')
|
||||
answer = get_input("foo", "bar")
|
||||
assert answer == 'bar'
|
||||
|
||||
|
||||
def test_get_input(monkeypatch):
|
||||
def test_get_input(monkeypatch: MonkeyPatch) -> None:
|
||||
monkeypatch.setattr('builtins.input', lambda x: 'baz')
|
||||
answer = get_input("foo", "bar")
|
||||
assert answer == 'baz'
|
||||
|
||||
|
||||
def test_quickstart(cleandir, monkeypatch):
|
||||
def test_quickstart(cleandir: str, monkeypatch: MonkeyPatch) -> None:
|
||||
monkeypatch.setattr('builtins.input', lambda x: 'foo')
|
||||
quickstart(None)
|
||||
with open('config.ini', 'r') as fh:
|
||||
|
||||
Reference in New Issue
Block a user