def test_parse_target(self): scope = scope_tree_to_scope({ 'modules': { 'a': { 'modules': { 'b': { 'modules': {'c': {}}, 'rules': ['r'], } } } } }) c, (r,) = run_task(scope.parse_target(DummyRuntime(), 'a.b.c|a.b.r')) assert type(c) is DummyModule and c.name == 'a.b.c' assert type(r) is DummyRule and r.name == 'a.b.r'
def test_parse_target(self): scope = scope_tree_to_scope({ 'modules': { 'a': { 'modules': { 'b': { 'modules': { 'c': {} }, 'rules': ['r'], } } } } }) c, (r, ) = run_task(scope.parse_target(DummyRuntime(), 'a.b.c|a.b.r')) assert type(c) is DummyModule and c.name == 'a.b.c' assert type(r) is DummyRule and r.name == 'a.b.r'
def test_plugin_get_reup_fields(context, type, fields): handle = TestDisplayHandle() return run_task(plugin.plugin_get_reup_fields( context, type, fields, handle))
def test_plugin_fetch(context, type, fields, dest): handle = TestDisplayHandle() run_task(plugin.plugin_fetch(context, type, fields, dest, handle)) return handle.getvalue()
def wrapper(*args, **kwargs): return run_task(f(*args, **kwargs))
def wrapper(*args, **kwargs): return run_task(asyncio.coroutine(f)(*args, **kwargs))
def test_plugin_get_reup_fields(context, type, fields): handle = TestDisplayHandle() return run_task( plugin.plugin_get_reup_fields(context, type, fields, handle))
def test_plugin_fetch(context, type, fields, dest): handle = TestDisplayHandle() run_task(plugin.plugin_fetch(context, type, fields, dest, handle)) return handle.getvalue()
def wrapper(*args, **kwargs): return run_task(f(*args, **kwargs))
def wrapper(*args, **kwargs): return run_task(asyncio.coroutine(f)(*args, **kwargs))