This commit is contained in:
Joachim Jablon
2021-07-24 00:12:23 +02:00
parent 5e2905c070
commit 38b2cf6c65
2 changed files with 8 additions and 3 deletions

View File

@@ -6,5 +6,4 @@ def code(arg: Optional[bool]) -> str:
return "a"
elif arg is True:
return "b"
else:
return "c"
return "c"

View File

@@ -3,6 +3,12 @@ import pytest
from . import code
@pytest.mark.parametrize("arg, expected", [(None, "a")])
@pytest.mark.parametrize(
"arg, expected",
[
(None, "a"),
(True, "b"),
],
)
def test_code(arg, expected):
assert code.code(arg) == expected