Example #1
0
 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'
Example #2
0
 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'
Example #3
0
def test_plugin_get_reup_fields(context, type, fields):
    handle = TestDisplayHandle()
    return run_task(plugin.plugin_get_reup_fields(
        context, type, fields, handle))
Example #4
0
def test_plugin_fetch(context, type, fields, dest):
    handle = TestDisplayHandle()
    run_task(plugin.plugin_fetch(context, type, fields, dest, handle))
    return handle.getvalue()
Example #5
0
 def wrapper(*args, **kwargs):
     return run_task(f(*args, **kwargs))
Example #6
0
 def wrapper(*args, **kwargs):
     return run_task(asyncio.coroutine(f)(*args, **kwargs))
Example #7
0
def test_plugin_get_reup_fields(context, type, fields):
    handle = TestDisplayHandle()
    return run_task(
        plugin.plugin_get_reup_fields(context, type, fields, handle))
Example #8
0
def test_plugin_fetch(context, type, fields, dest):
    handle = TestDisplayHandle()
    run_task(plugin.plugin_fetch(context, type, fields, dest, handle))
    return handle.getvalue()
Example #9
0
 def wrapper(*args, **kwargs):
     return run_task(f(*args, **kwargs))
Example #10
0
 def wrapper(*args, **kwargs):
     return run_task(asyncio.coroutine(f)(*args, **kwargs))