Пример #1
0
def test_join_to_series_one() -> None:
    words = ["this"]
    assert join_to_series(words) == "this"
Пример #2
0
def test_join_to_series_empty() -> None:
    words = []
    assert join_to_series(words) == ""
Пример #3
0
def test_join_to_series_three_no_oxford_comma() -> None:
    words = ["this", "that", "the other"]
    assert join_to_series(words, oxford_comma=False) == "this, that and the other"
Пример #4
0
def test_join_to_series_three_or() -> None:
    words = ["this", "that", "the other"]
    assert join_to_series(words, conjunction="or") == "this, that, or the other"
Пример #5
0
def test_join_to_series_three() -> None:
    words = ["this", "that", "the other"]
    assert join_to_series(words) == "this, that, and the other"
Пример #6
0
def test_join_to_series_two() -> None:
    words = ["this", "that"]
    assert join_to_series(words) == "this and that"