Пример #1
0
def test_corce_to_list_splits(value):
    """Ensure words joined with any of the value chars are split by coerce."""

    phrase = "In the beginning were the Words".split()
    assert configure.coerce_to_list(value.join(phrase)) == [
        "In",
        "Words",
        "beginning",
        "the",
        "the",
        "were",
    ]
Пример #2
0
def test_corce_to_list_splits(value):
    """Ensure words joined with any of the value chars are split by coerce."""

    phrase = "In the beginning were the Words".split()
    assert configure.coerce_to_list(value.join(phrase)) == [
        "In",
        "Words",
        "beginning",
        "the",
        "the",
        "were",
    ]
Пример #3
0
def test_coerce_to_list_sorts():
    """Ensure coerce to list returns a sorted list if it's already a list."""

    assert configure.coerce_to_list(["foo", "bar", "baz", "potato"]) == [
        "bar", "baz", "foo", "potato"
    ]
Пример #4
0
def test_coerce_to_list_sorts():
    """Ensure coerce to list returns a sorted list if it's already a list."""

    assert configure.coerce_to_list(["foo", "bar", "baz", "potato"
                                     ]) == ["bar", "baz", "foo", "potato"]