Пример #1
0
def test_env_int_incorrect_default():
    env = Environment({})
    with raises(AssertionError):
        env.int("<key>", default="42")
Пример #2
0
def test_env_int():
    env = Environment({"<key>": "42"})

    value = cast(FutureValue, env.int("<key>"))
    assert value.get() == 42