diff options
Diffstat (limited to 'functionaltests/test_configobj.py')
-rw-r--r-- | functionaltests/test_configobj.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/functionaltests/test_configobj.py b/functionaltests/test_configobj.py index 53845e6..81e5441 100644 --- a/functionaltests/test_configobj.py +++ b/functionaltests/test_configobj.py @@ -61,5 +61,23 @@ class TestConfigObj(unittest.TestCase): self.assertEqual(c.pop('a'), 3) self.assertEqual(c.pop('b', 3), 3) self.assertRaises(KeyError, c.pop, 'c') + + + def test_interpolation_with_section_names(self): + cfg = """ +item1 = 1234 +[section] + [[item1]] + foo='bar' + [[DEFAULT]] + [[[item1]]] + why = would you do this? + [[other-subsection]] + item2 = '$item1'""".splitlines() + c = ConfigObj(cfg, interpolation='Template') + # This raises an exception in 4.7.1 and earlier + repr(c) + + |