commented code for unicity by name
This commit is contained in:
@ -42,22 +42,32 @@ def make_description_duplicates():
|
||||
wantframework_option = BoolOption('wantframework', 'Test requires',
|
||||
default=False,
|
||||
requires=['boolop'])
|
||||
# dummy2 (same name)
|
||||
# dummy2 (same path)
|
||||
gcdummy2 = BoolOption('dummy', 'dummy2', default=True)
|
||||
# dummy3 (same name)
|
||||
gcdummy3 = BoolOption('dummy', 'dummy2', default=True)
|
||||
gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, gcdummy2, floatoption])
|
||||
descr = OptionDescription('constraints', '', [gcgroup, booloption, objspaceoption,
|
||||
wantref_option, stroption,
|
||||
wantframework_option,
|
||||
intoption, boolop])
|
||||
intoption, boolop, gcdummy3])
|
||||
return descr
|
||||
|
||||
def test_identical_names():
|
||||
def test_identical_paths():
|
||||
"""If in the schema (the option description) there is something that
|
||||
have the same name, an exection is raised
|
||||
"""
|
||||
descr = make_description_duplicates()
|
||||
raises(ConflictConfigError, "cfg = Config(descr)")
|
||||
|
||||
#def test_identical_for_names():
|
||||
# """if there is something that
|
||||
# have the same name, an exection is raised
|
||||
# """
|
||||
# descr = make_description_duplicates()
|
||||
# raises(ConflictConfigError, "cfg = Config(descr)")
|
||||
|
||||
|
||||
def make_description2():
|
||||
gcoption = ChoiceOption('name', 'GC name', ['ref', 'framework'], 'ref')
|
||||
gcdummy = BoolOption('dummy', 'dummy', default=False)
|
||||
@ -202,4 +212,3 @@ def test_disabled_with_group():
|
||||
raises(PropertiesOptionError, "cfg.gc.name")
|
||||
assert gcgroup._is_disabled()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user