summaryrefslogtreecommitdiff
path: root/test_configobj.py
diff options
context:
space:
mode:
authorfuzzyman <devnull@localhost>2009-10-25 20:53:07 +0000
committerfuzzyman <devnull@localhost>2009-10-25 20:53:07 +0000
commitb126d8fde44bc9ce373951918d5b2c72f420ce4d (patch)
tree0c5a1d96e18a7150e2687c2acbdb5d5a67b16d11 /test_configobj.py
parenta25ed92de120446e3b58585ab1b362990851e81f (diff)
downloadconfigobj-b126d8fde44bc9ce373951918d5b2c72f420ce4d.tar.gz
Addition of 'extra_values' section member.
Diffstat (limited to 'test_configobj.py')
-rw-r--r--test_configobj.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test_configobj.py b/test_configobj.py
index 30d99b6..f02d240 100644
--- a/test_configobj.py
+++ b/test_configobj.py
@@ -2021,6 +2021,23 @@ def _test_list_interpolation():
['foo', 3]
"""
+def _test_extra_values():
+ """
+ >>> spec = ['[section]']
+ >>> infile = ['bar = 3', '[something]', 'foo = fish', '[section]', 'foo=boo']
+ >>> c = ConfigObj(infile, configspec=spec)
+ >>> c.extra_values
+ []
+ >>> c.extra_values = ['bar', 'gosh', 'what']
+ >>> c.validate(Validator())
+ 1
+ >>> c.extra_values
+ ['bar', 'something']
+ >>> c['section'].extra_values
+ ['foo']
+ >>> c['something'].extra_values
+ []
+ """
# TODO: Test BOM handling
# TODO: Test error code for badly built multiline values