Rev 5561: Add a cmore complex loop scenario and check the reported exception. in file:///home/vila/src/bzr/experimental/config/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Feb 4 16:51:38 UTC 2011


At file:///home/vila/src/bzr/experimental/config/

------------------------------------------------------------
revno: 5561
revision-id: v.ladeuil+lp at free.fr-20110204165138-25d5pxdivlefh2rb
parent: v.ladeuil+lp at free.fr-20110204161127-fw54y34iqc7060dz
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: interpolate
timestamp: Fri 2011-02-04 17:51:38 +0100
message:
  Add a cmore complex loop scenario and check the reported exception.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py	2011-02-04 15:48:32 +0000
+++ b/bzrlib/tests/test_config.py	2011-02-04 16:51:38 +0000
@@ -379,6 +379,13 @@
         c = self.get_config('foo={foo}')
         self.assertRaises(errors.InterpolationLoop, c.interpolate, '{foo}')
 
+    def test_indirect_loop(self):
+        c = self.get_config('foo={bar}\nbar={baz}\nbaz={foo}')
+        e = self.assertRaises(errors.InterpolationLoop,
+                              c.interpolate, '{foo}')
+        self.assertEquals('foo->bar->baz', e.refs)
+        self.assertEquals('{foo}', e.string)
+
 
 class TestConfig(tests.TestCase):
 



More information about the bazaar-commits mailing list