Rev 2901: * bzrlib/tests/test_config.py: in file:///v/home/vila/src/bzr/bugs/149019/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Oct 9 21:25:23 BST 2007
At file:///v/home/vila/src/bzr/bugs/149019/
------------------------------------------------------------
revno: 2901
revision-id: v.ladeuil+lp at free.fr-20071009202521-pdg82kmh38lj3wek
parent: pqm at pqm.ubuntu.com-20071009084347-m6boff8rxmzsz28f
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 149019
timestamp: Tue 2007-10-09 22:25:21 +0200
message:
* bzrlib/tests/test_config.py:
(TestConfigObjErrors): Add a test reproducing the bug.
modified:
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
-------------- next part --------------
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py 2007-10-05 14:52:02 +0000
+++ b/bzrlib/tests/test_config.py 2007-10-09 20:25:21 +0000
@@ -211,6 +211,21 @@
self.assertIs(co.get_bool('UPPERCASE', 'nonactive'), False)
+erroneous_config = """[section] # line 1
+good=good # line 2
+[section] # line 3
+whocares=notme # line 4
+"""
+class TestConfigObjErrors(TestCase):
+
+ def test_duplicate_section_name_error_line(self):
+ try:
+ co = ConfigObj(StringIO(erroneous_config), raise_errors=True)
+ except config.configobj.DuplicateError, e:
+ self.assertEqual(3, e.line_number)
+ else:
+ self.fail('Error in config file not detected')
+
class TestConfig(TestCase):
def test_constructs(self):
More information about the bazaar-commits
mailing list