示例#1
0
文件: app.py 项目: bdeeney/relvlast
def stack(app):
    assert get_current() is app.stack.top
    assert current.application is app
    first_env = get_current()
    with app.contextbound(create_environ()) as second_env:
        assert get_current() is not first_env
        assert get_current() is second_env
    assert get_current() is first_env
示例#2
0
文件: units.py 项目: bdeeney/relvlast
def unbound_contexts():
    with raises(UnboundContextError):
        get_current()
    with raises(UnboundContextError):
        current.application