Ejemplo n.º 1
0
def test_nested_ns():
    with t.ns("rho"):
        with t.ns("wade"):
            @t.task
            def foo():
                return 2
    check_ns()
Ejemplo n.º 2
0
def test_nested_ns():
    with t.ns("rho"):
        with t.ns("wade"):

            @t.task
            def foo():
                return 2

    check_ns()
Ejemplo n.º 3
0
def test_nested_reference():
    with t.ns("rho"):
        @t.task
        def foo():
            return 2
        with t.ns("wade"):
            @t.task([foo])
            def bar():
                return "hi"
    t.app.run(None, ["rho:wade:bar"])
    
Ejemplo n.º 4
0
def test_nested_reference():
    with t.ns("rho"):

        @t.task
        def foo():
            return 2

        with t.ns("wade"):

            @t.task([foo])
            def bar():
                return "hi"

    t.app.run(None, ["rho:wade:bar"])
Ejemplo n.º 5
0
def test_simple_ns():
    with t.ns("rho"):
        @t.task
        def foo():
            return 2
    t.raises(t.TaskNotFoundError, t.app.run, None, ["foo"])
    t.app.run(None, ["rho:foo"])
    t.eq(t.app._dbg, [("rho:foo", 2)])
Ejemplo n.º 6
0
def test_simple_ns():
    with t.ns("rho"):

        @t.task
        def foo():
            return 2

    t.raises(t.TaskNotFoundError, t.app.run, None, ["foo"])
    t.app.run(None, ["rho:foo"])
    t.eq(t.app._dbg, [("rho:foo", 2)])