Exemplo n.º 1
0
def test_env_tuple_incorrect_default():
    env = Environment({})
    with raises(AssertionError):
        env.tuple("<key>", default=[])
Exemplo n.º 2
0
def test_env_tuple_with_separator():
    env = Environment({"<key>": "first second"})

    value = cast(FutureValue, env.tuple("<key>", separator=" "))
    assert value.get() == ("first", "second",)
Exemplo n.º 3
0
def test_env_tuple():
    env = Environment({"<key>": "first, second"})

    value = cast(FutureValue, env.tuple("<key>"))
    assert value.get() == ("first", "second",)