def setUp(self):
# Example intentionally not in order
example = """
[ACL]
foo.baz: ACL
foo.acl: ACL
[ACL/Rule A]
foo.bar: ACL-Rule-A
[ACL/Rule B]
foo.baz: ACL-Rule-B
[DEFAULTS]
foo.bar: Default
foo.baz: Default
[Deep/Subsection/Without/Parents]
foo.baz: Deep
[ACL/DEFAULTS]
foo.bar: ACL-Default
foo.baz: ACL-Default
"""
self.parser = config.ConfigParser()
if six.PY2:
self.parser.readfp(io.BytesIO(dedent(example)))
else:
self.parser.read_string(example)
评论列表
文章目录