From ac62931525517140e39dc38038f99b566b506494 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 22 Aug 2013 22:57:32 +0200 Subject: [PATCH] add test for recursive path in requirement --- test/test_requires.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_requires.py b/test/test_requires.py index 9376364..899c1c3 100644 --- a/test/test_requires.py +++ b/test/test_requires.py @@ -439,3 +439,14 @@ def test_requires_requirement_append(): c = Config(od) c.read_write() raises(ValueError, 'c.cfgimpl_get_settings()[b].append("disabled")') + + +def test_requires_recursive_path(): + a = BoolOption('activate_service', '', True) + b = IPOption('ip_address_service', '', + requires=[{'option': a, 'expected': False, 'action': 'disabled'}]) + od1 = OptionDescription('service', '', [a, b], requires=[{'option': a, 'expected': False, 'action': 'disabled'}]) + od = OptionDescription('base', '', [od1]) + c = Config(od) + c.read_write() + raises(RequirementError, 'c.service.a')