requirement are now a dictionary (not anymore a tuple)
This commit is contained in:
@ -32,10 +32,10 @@ def make_description():
|
||||
stroption = StrOption('str', 'Test string option', default="abc")
|
||||
boolop = BoolOption('boolop', 'Test boolean option op', default=True)
|
||||
wantref_option = BoolOption('wantref', 'Test requires', default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
wantframework_option = BoolOption('wantframework', 'Test requires',
|
||||
default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption, intoption2])
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption, objspaceoption,
|
||||
wantref_option, stroption,
|
||||
@ -56,10 +56,10 @@ def make_description_duplicates():
|
||||
stroption = StrOption('str', 'Test string option', default="abc")
|
||||
boolop = BoolOption('boolop', 'Test boolean option op', default=True)
|
||||
wantref_option = BoolOption('wantref', 'Test requires', default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
wantframework_option = BoolOption('wantframework', 'Test requires',
|
||||
default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
# dummy2 (same path)
|
||||
gcdummy2 = BoolOption('dummy', 'dummy2', default=True)
|
||||
# dummy3 (same name)
|
||||
@ -94,11 +94,11 @@ def make_description2():
|
||||
boolop = BoolOption('boolop', 'Test boolean option op', default=True)
|
||||
boolop.enable_multi()
|
||||
wantref_option = BoolOption('wantref', 'Test requires', default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
# second multi
|
||||
wantframework_option = BoolOption('wantframework', 'Test requires',
|
||||
default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
wantframework_option.enable_multi()
|
||||
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption])
|
||||
@ -167,7 +167,7 @@ def make_description_requires():
|
||||
booloption = BoolOption('bool', 'Test boolean option', default=True)
|
||||
intoption = IntOption('int', 'Test int option', default=0)
|
||||
stroption = StrOption('str', 'Test string option', default="abc",
|
||||
requires=((intoption, 1, 'hidden'),))
|
||||
requires=({'option': intoption, 'expected': 1, 'action': 'hidden'},))
|
||||
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption])
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption, objspaceoption,
|
||||
@ -200,7 +200,7 @@ def test_hidden_if_in_with_group():
|
||||
intoption = IntOption('int', 'Test int option', default=0)
|
||||
stroption = StrOption('str', 'Test string option', default="abc")
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption],
|
||||
requires=((intoption, 1, 'hidden'),))
|
||||
requires=({'option': intoption, 'expected': 1, 'action': 'hidden'},))
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption,
|
||||
objspaceoption, stroption, intoption])
|
||||
cfg = Config(descr)
|
||||
@ -223,7 +223,7 @@ def test_disabled_with_group():
|
||||
intoption = IntOption('int', 'Test int option', default=0)
|
||||
stroption = StrOption('str', 'Test string option', default="abc")
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption],
|
||||
requires=((intoption, 1, 'disabled'),))
|
||||
requires=({'option': intoption, 'expected': 1, 'action': 'disabled'},))
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption,
|
||||
objspaceoption, stroption, intoption])
|
||||
cfg = Config(descr)
|
||||
@ -245,10 +245,10 @@ def make_description_callback():
|
||||
stroption = StrOption('str', 'Test string option', default="abc")
|
||||
boolop = BoolOption('boolop', 'Test boolean option op', default=True)
|
||||
wantref_option = BoolOption('wantref', 'Test requires', default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
wantframework_option = BoolOption('wantframework', 'Test requires',
|
||||
default=False,
|
||||
requires=((boolop, True, 'hidden'),))
|
||||
requires=({'option': boolop, 'expected': True, 'action': 'hidden'},))
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption])
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption, objspaceoption,
|
||||
wantref_option, stroption,
|
||||
|
Reference in New Issue
Block a user