diff tests/test.py @ 711:6557cf9ecea5

FIX: When using attribute access for configurations the values are interpolated since long ago: fix the docu and add a test for that behaviour
author Franz Glasner <f.glasner@feldmann-mg.com>
date Tue, 15 Aug 2023 15:09:11 +0200
parents ff0de14493f1
children 6d9552eb7e4d
line wrap: on
line diff
--- a/tests/test.py	Tue Aug 15 14:31:46 2023 +0200
+++ b/tests/test.py	Tue Aug 15 15:09:11 2023 +0200
@@ -1869,6 +1869,12 @@
         self.assertEqual(0x20, jcfg.key3)
         self.assertEqual(u"off", jcfg.tree2.key6)
 
+    def test_attribute_access_interpolates(self):
+        cfg = configmix.load(os.path.join(TESTDATADIR, "conf10.py"))
+        self.assertEqual(
+            [u"val1", u"val2", u"in the root namespace"],
+            cfg.tree1.tree2.key8)
+
     def test_attribute_access_non_existing(self):
         cfg = configmix.load(os.path.join(TESTDATADIR, "conf10.py"))
         jcfg = cfg.jailed(rootpath=(u"tree1",))