def test_nested_ns(): with t.ns("rho"): with t.ns("wade"): @t.task def foo(): return 2 check_ns()
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"])
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)])