示例#1
0
 def __init__(self, parent=None):
     super().__init__(parent)
     self._initialized = False
     self._configdir = None
     self._fname = None
     self.sections = configdata.data()
     self._interpolation = configparser.ExtendedInterpolation()
     self._proxies = {}
     for sectname in self.sections:
         self._proxies[sectname] = SectionProxy(self, sectname)
示例#2
0
 def __init__(self, parent=None):
     super().__init__(parent)
     self._initialized = False
     self._configdir = None
     self._fname = None
     self.sections = configdata.data()
     self._interpolation = configparser.ExtendedInterpolation()
     self._proxies = {}
     for sectname in self.sections:
         self._proxies[sectname] = SectionProxy(self, sectname)
示例#3
0
 def __init__(self, configdir, fname, relaxed=False, parent=None):
     super().__init__(parent)
     self._initialized = False
     self.sections = configdata.data()
     self._interpolation = configparser.ExtendedInterpolation()
     self._proxies = {}
     for sectname in self.sections:
         self._proxies[sectname] = SectionProxy(self, sectname)
     self._fname = fname
     if configdir is None:
         self._configdir = None
         self._initialized = True
     else:
         self._configdir = configdir
         parser = ini.ReadConfigParser(configdir, fname)
         self._from_cp(parser, relaxed)
         self._initialized = True
         self._validate_all()
示例#4
0
 def __init__(self, configdir, fname, relaxed=False, parent=None):
     super().__init__(parent)
     self._initialized = False
     self.sections = configdata.data()
     self._interpolation = configparser.ExtendedInterpolation()
     self._proxies = {}
     for sectname in self.sections.keys():
         self._proxies[sectname] = SectionProxy(self, sectname)
     self._fname = fname
     if configdir is None:
         self._configdir = None
         self._initialized = True
     else:
         self._configdir = configdir
         parser = ini.ReadConfigParser(configdir, fname)
         self._from_cp(parser, relaxed)
         self._initialized = True
         self._validate_all()
示例#5
0
def test_data():
    """Some simple sanity tests on data()."""
    data = configdata.data()
    assert 'general' in data
    assert 'ignore-case' in data['general']
示例#6
0
def test_data():
    """Some simple sanity tests on data()."""
    data = configdata.data()
    assert 'general' in data
    assert 'ignore-case' in data['general']