예제 #1
0
파일: __init__.py 프로젝트: xlqian/addok
def resolve_path(name):
    from addok.helpers import import_by_path
    attr = globals()[name]
    for idx, path in enumerate(attr):
        attr[idx] = import_by_path(path)
예제 #2
0
파일: test_utils.py 프로젝트: symroe/addok
def test_import_by_path(input, expected):
    assert import_by_path(input) == expected
예제 #3
0
파일: plugin.py 프로젝트: addok/addok-psql
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
예제 #4
0
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
예제 #5
0
def resolve_path(name):
    from addok.helpers import import_by_path
    attr = globals()[name]
    for idx, path in enumerate(attr):
        attr[idx] = import_by_path(path)
예제 #6
0
 def resolve_paths(self, key):
     from addok.helpers import import_by_path
     self[key[:-len('_PYPATHS')]] = [
         import_by_path(path) for path in self[key]
     ]
예제 #7
0
 def resolve_path(self, key):
     from addok.helpers import import_by_path
     self[key[:-len('_PYPATH')]] = import_by_path(self[key])
예제 #8
0
def test_import_by_path(input, expected):
    assert import_by_path(input) == expected
예제 #9
0
 def resolve_paths(self, key):
     from addok.helpers import import_by_path
     attr = self[key]
     for idx, path in enumerate(attr):
         attr[idx] = import_by_path(path)