예제 #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'
예제 #2
0
파일: test_scope.py 프로젝트: stefb965/peru
 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'
예제 #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))
예제 #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()
예제 #5
0
파일: shared.py 프로젝트: buildinspace/peru
 def wrapper(*args, **kwargs):
     return run_task(f(*args, **kwargs))
예제 #6
0
파일: shared.py 프로젝트: stefb965/peru
 def wrapper(*args, **kwargs):
     return run_task(asyncio.coroutine(f)(*args, **kwargs))
예제 #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))
예제 #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()
예제 #9
0
파일: shared.py 프로젝트: pombredanne/peru
 def wrapper(*args, **kwargs):
     return run_task(f(*args, **kwargs))
예제 #10
0
파일: shared.py 프로젝트: oconnor663/peru
 def wrapper(*args, **kwargs):
     return run_task(asyncio.coroutine(f)(*args, **kwargs))