Exemplo n.º 1
0
    class Resource(object):
        def __init__(self, smvApp, fqn):
            self.dsr = DataSetRepo(smvApp)
            self.fqn = fqn

        def __enter__(self):
            return self.dsr.loadDataSet(self.fqn)

        def __exit__(self, type, value, traceback):
            pass
Exemplo n.º 2
0
    class Resource(object):
        def __init__(self, smvApp, fqn):
            self.dsr = DataSetRepo(smvApp)
            self.fqn = fqn

        def __enter__(self):
            return self.dsr.loadDataSet(self.fqn)

        def __exit__(self, type, value, traceback):
            pass
Exemplo n.º 3
0
    class Resource(object):
        def __init__(self, smvApp, path, fqn):
            self.dsr = DataSetRepo(smvApp)
            self.path = path
            self.fqn = fqn

        def __enter__(self):
            sys.path.insert(1, self.path)
            return self.dsr.loadDataSet(self.fqn)

        def __exit__(self, type, value, traceback):
            sys.path.remove(self.path)
Exemplo n.º 4
0
    class Resource(object):
        def __init__(self, smvApp, path, fqn):
            self.dsr = DataSetRepo(smvApp)
            self.path = path
            self.fqn = fqn

        def __enter__(self):
            sys.path.insert(1,self.path)
            return self.dsr.loadDataSet(self.fqn)

        def __exit__(self, type, value, traceback):
            sys.path.remove(self.path)
Exemplo n.º 5
0
    class Resource(object):
        def __init__(self, smvApp, target_path, fqn):
            self.smvApp = smvApp
            self.dsr = DataSetRepo(smvApp)
            self.orig_path = os.getcwd()
            self.target_path = target_path
            self.fqn = fqn

        def __enter__(self):
            self.smvApp.setAppDir(self.target_path)
            return self.dsr.loadDataSet(self.fqn)

        def __exit__(self, type, value, traceback):
            self.smvApp.setAppDir(self.orig_path)
Exemplo n.º 6
0
 def refresh_provider_cache(self):
     """Re-discover providers and set provider_cache"""
     self.provider_cache = DataSetRepo(self)._all_providers()
Exemplo n.º 7
0
 def __init__(self, smvApp, path, fqn):
     self.dsr = DataSetRepo(smvApp)
     self.path = path
     self.fqn = fqn
Exemplo n.º 8
0
 def __init__(self, smvApp, fqn):
     self.dsr = DataSetRepo(smvApp)
     self.fqn = fqn
Exemplo n.º 9
0
 def __init__(self, smvApp, path, fqn):
     self.dsr = DataSetRepo(smvApp)
     self.path = path
     self.fqn = fqn
Exemplo n.º 10
0
    def build_new_repo(self): return DataSetRepo(self.smvApp)

    def test_discover_new_module_in_file(self):
Exemplo n.º 11
0
 def build_new_repo(self):
     return DataSetRepo(self.smvApp)
Exemplo n.º 12
0
 def __enter__(self):
     self.smvApp.setAppDir(self.target_path)
     dsr = DataSetRepo(self.smvApp)
     return dsr.loadDataSet(self.fqn)
Exemplo n.º 13
0
 def __init__(self, smvApp, fqn):
     self.dsr = DataSetRepo(smvApp)
     self.fqn = fqn
Exemplo n.º 14
0
 def __init__(self, smvApp, target_path, fqn):
     self.smvApp = smvApp
     self.dsr = DataSetRepo(smvApp)
     self.orig_path = os.getcwd()
     self.target_path = target_path
     self.fqn = fqn