Skip to content

Commit 092415f

Browse files
committed
Add listing oxford test case
1 parent 82de558 commit 092415f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/unit/test_lists.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,22 @@ def test_listing_with_conjunction(
3838
) -> None:
3939
"""Listing with separator and conjunction."""
4040
assert lists.listing(*params) == expected
41+
42+
43+
@pytest.mark.parametrize(
44+
"params, expected",
45+
[
46+
(([], ";", "or"), ""), # empty list
47+
((["jorbas"], ";", "or"), "jorbas"), # one element
48+
((["jorbas", "maria"], ";", "or"), "jorbas or maria"), # two elements
49+
(
50+
(["jorbas", "maria", "gustavo"], ";", "or"),
51+
"jorbas; maria; or gustavo",
52+
), # three elements
53+
],
54+
)
55+
def test_listing_with_conjunction_oxford(
56+
params: tuple[list[str], str, str], expected: str
57+
) -> None:
58+
"""Listing with separator and conjunction."""
59+
assert lists.listing(*params, oxford=True) == expected

0 commit comments

Comments
 (0)