Skip to content

Commit

Permalink
Parametrize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquebastos committed Feb 2, 2022
1 parent a4b104d commit f802447
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_strtobool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
from decouple import strtobool


def test_true_values():
for item in ("Y", "YES", "T", "TRUE", "ON", "1"):
assert strtobool(item)
@pytest.mark.parametrize("value", ("Y", "YES", "T", "TRUE", "ON", "1"))
def test_true_values(value):
assert strtobool(value)


def test_false_values():
for item in ("N", "NO", "F", "FALSE", "OFF", "0"):
assert strtobool(item) is False
@pytest.mark.parametrize("value", ("N", "NO", "F", "FALSE", "OFF", "0"))
def test_false_values(value):
assert strtobool(value) is False


def test_invalid():
Expand Down

0 comments on commit f802447

Please sign in to comment.