Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.test_cfgparser.RawConfigParserTestSambaConf Class Reference
Inheritance diagram for test.test_cfgparser.RawConfigParserTestSambaConf:
Inheritance graph
[legend]
Collaboration diagram for test.test_cfgparser.RawConfigParserTestSambaConf:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_reading
def newconfig
def fromstring

Static Public Attributes

 config_class = configparser.RawConfigParser
tuple comment_prefixes = ('#', ';', '----')
tuple inline_comment_prefixes = ('//',)
 empty_lines_in_values = False
 allow_no_value = False
tuple delimiters = ('=', ':')
 dict_type = configparser._default_dict
 strict = False
 default_section = configparser.DEFAULTSECT
 interpolation = configparser._UNSET

Detailed Description

Definition at line 1008 of file test_cfgparser.py.


Member Function Documentation

def test.test_cfgparser.CfgParserTestCaseClass.fromstring (   self,
  string,
  defaults = None 
) [inherited]

Reimplemented in test.test_cfgparser.CopyTestCase.

Definition at line 62 of file test_cfgparser.py.

00062 
00063     def fromstring(self, string, defaults=None):
00064         cf = self.newconfig(defaults)
00065         cf.read_string(string)
00066         return cf

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_cfgparser.CfgParserTestCaseClass.newconfig (   self,
  defaults = None 
) [inherited]

Definition at line 46 of file test_cfgparser.py.

00046 
00047     def newconfig(self, defaults=None):
00048         arguments = dict(
00049             defaults=defaults,
00050             allow_no_value=self.allow_no_value,
00051             delimiters=self.delimiters,
00052             comment_prefixes=self.comment_prefixes,
00053             inline_comment_prefixes=self.inline_comment_prefixes,
00054             empty_lines_in_values=self.empty_lines_in_values,
00055             dict_type=self.dict_type,
00056             strict=self.strict,
00057             default_section=self.default_section,
00058             interpolation=self.interpolation,
00059         )
00060         instance = self.config_class(**arguments)
00061         return instance

Here is the caller graph for this function:

Definition at line 1014 of file test_cfgparser.py.

01014 
01015     def test_reading(self):
01016         smbconf = support.findfile("cfgparser.2")
01017         # check when we pass a mix of readable and non-readable files:
01018         cf = self.newconfig()
01019         parsed_files = cf.read([smbconf, "nonexistent-file"], encoding='utf-8')
01020         self.assertEqual(parsed_files, [smbconf])
01021         sections = ['global', 'homes', 'printers',
01022                     'print$', 'pdf-generator', 'tmp', 'Agustin']
01023         self.assertEqual(cf.sections(), sections)
01024         self.assertEqual(cf.get("global", "workgroup"), "MDKGROUP")
01025         self.assertEqual(cf.getint("global", "max log size"), 50)
01026         self.assertEqual(cf.get("global", "hosts allow"), "127.")
01027         self.assertEqual(cf.get("tmp", "echo command"), "cat %s; rm %s")

Here is the call graph for this function:


Member Data Documentation

Reimplemented from test.test_cfgparser.CfgParserTestCaseClass.

Definition at line 1010 of file test_cfgparser.py.

Definition at line 1009 of file test_cfgparser.py.

tuple test.test_cfgparser.CfgParserTestCaseClass.delimiters = ('=', ':') [static, inherited]
test.test_cfgparser.CfgParserTestCaseClass.dict_type = configparser._default_dict [static, inherited]

Reimplemented in test.test_cfgparser.SortedTestCase.

Definition at line 41 of file test_cfgparser.py.

Reimplemented from test.test_cfgparser.CfgParserTestCaseClass.

Definition at line 1012 of file test_cfgparser.py.

Reimplemented from test.test_cfgparser.CfgParserTestCaseClass.

Definition at line 1011 of file test_cfgparser.py.


The documentation for this class was generated from the following file: