diff --git a/ChangeLog b/ChangeLog index 1be2c27..e5aa862 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Mon Jan 9 20:12:02 2017 +0200 Emmanuel Garette + * make_dict has new fullpath option + Wed Nov 16 22:30:12 2016 +0200 Emmanuel Garette * consistency "not_equal" works now with multi and submulti * a multi or submulti could be "unique" (same value one time) diff --git a/test/test_config_api.py b/test/test_config_api.py index 2bd1adc..b96607a 100644 --- a/test/test_config_api.py +++ b/test/test_config_api.py @@ -149,6 +149,7 @@ def test_make_dict_fullpath(): config.read_only() assert config.make_dict() == {"opt.s1.a": False, "opt.int": 42, "introot": 42} assert config.opt.make_dict() == {"s1.a": False, "int": 42} + assert config.make_dict(fullpath=True) == {"opt.s1.a": False, "opt.int": 42, "introot": 42} assert config.opt.make_dict(fullpath=True) == {"opt.s1.a": False, "opt.int": 42} diff --git a/tiramisu/config.py b/tiramisu/config.py index 9dd96d8..43ac14d 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -545,7 +545,11 @@ class SubConfig(object): name = opt.impl_getname() else: if fullpath: - name = '.'.join([self._impl_path, opt.impl_getname()]) + root_path = self.cfgimpl_get_path() + if root_path is None: + name = opt.impl_getname() + else: + name = '.'.join([root_path, opt.impl_getname()]) else: name = '.'.join(_currpath + [opt.impl_getname()]) pathsvalues.append((name, value))