From 84d1f85b90c52fc9b660194dd1080831e955bd8b Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 15 Sep 2018 10:45:36 +0200 Subject: [PATCH] test if new_config copy owner owners.meta is no more a special owners --- test/test_metaconfig.py | 8 ++++++++ tiramisu/setting.py | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/test_metaconfig.py b/test/test_metaconfig.py index b43ea51..320ce86 100644 --- a/test/test_metaconfig.py +++ b/test/test_metaconfig.py @@ -185,6 +185,14 @@ def test_meta_new_config(): assert len(list(meta.config.list())) == 3 +def test_meta_new_config_owner(): + od = make_description() + meta = MetaConfig(['name1', 'name2'], optiondescription=od) + meta.owner.set('meta') + meta.config.new('newconf1') + assert meta.owner.get() == 'meta' + + def test_meta_new_metaconfig(): od = make_description() meta = MetaConfig(['name1', 'name2'], optiondescription=od) diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 0123018..86623d6 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -303,12 +303,9 @@ owners.user = owners.Owner('user') """forced special owner when value is forced""" owners.forced = owners.Owner('forced') -"""meta - special owner when value comes from metaconfig""" -owners.meta = owners.Owner('meta') -forbidden_owners = (owners.default, owners.forced, owners.meta) +forbidden_owners = (owners.default, owners.forced) # ____________________________________________________________