summaryrefslogtreecommitdiffstats
path: root/Lib/test/output
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-27 22:45:25 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-27 22:45:25 (GMT)
commit8ef6767e004267ccb4bbbe0a7762d8d69a8c62c6 (patch)
tree4b33a0edcc58e133f62acf1ff318d2afa4232cfc /Lib/test/output
parent2a37f9f862b81056601584f53a2d5ef88c85d566 (diff)
downloadcpython-8ef6767e004267ccb4bbbe0a7762d8d69a8c62c6.zip
cpython-8ef6767e004267ccb4bbbe0a7762d8d69a8c62c6.tar.gz
cpython-8ef6767e004267ccb4bbbe0a7762d8d69a8c62c6.tar.bz2
Regression test for ConfigParser module.
Diffstat (limited to 'Lib/test/output')
-rw-r--r--Lib/test/output/test_cfgparser51
1 files changed, 51 insertions, 0 deletions
diff --git a/Lib/test/output/test_cfgparser b/Lib/test/output/test_cfgparser
new file mode 100644
index 0000000..2849905
--- /dev/null
+++ b/Lib/test/output/test_cfgparser
@@ -0,0 +1,51 @@
+test_cfgparser
+
+Testing basic accessors...
+['Commented Bar', 'Foo Bar', 'Spacey Bar']
+Commented Bar: ['foo']
+Foo Bar: ['foo']
+Spacey Bar: ['foo']
+'bar'
+'bar'
+'bar'
+__name__ "option" properly hidden by the API.
+
+Testing value interpolation...
+'Foo'
+'something with interpolation (1 step)'
+'something with lots of interpolation (9 steps)'
+'something with lots of interpolation (10 steps)'
+Caught expected InterpolationDepthError :
+Value interpolation too deeply recursive:
+ section: [Foo]
+ option : bar11
+ rawval : something %(with11)s lots of interpolation (11 steps)
+
+
+Testing for parsing errors...
+Caught expected exception: File contains parsing errors: <???>
+ [line 2]: ' extra-spaces: splat\012'
+Caught expected exception: File contains parsing errors: <???>
+ [line 2]: ' extra-spaces= splat\012'
+Caught expected exception: File contains parsing errors: <???>
+ [line 2]: 'option-without-value\012'
+Caught expected exception: File contains parsing errors: <???>
+ [line 2]: ':value-without-option-name\012'
+Caught expected exception: File contains parsing errors: <???>
+ [line 2]: '=value-without-option-name\012'
+Caught expected exception: File contains no section headers.
+file: <???>, line: 1
+'No Section!\012'
+
+Testing query interface...
+[]
+Has section 'Foo'? 0
+Caught expected NoSectionError: No section: Foo
+Caught expected NoSectionError: No section: foo
+Caught expected NoSectionError :
+No section: foo
+Caught expected NoOptionError :
+No option `bar' in section: foo
+
+Testing miscellaneous error conditions...
+Caught expected DuplicateSectionError: Section Foo already exists