symlink support for getowner and raise if option in master/slave
This commit is contained in:
@ -5,7 +5,7 @@ from py.test import raises
|
||||
from tiramisu.setting import owners
|
||||
from tiramisu.config import Config
|
||||
from tiramisu.option import ChoiceOption, BoolOption, IntOption, FloatOption, \
|
||||
StrOption, OptionDescription, SymLinkOption
|
||||
StrOption, OptionDescription
|
||||
from tiramisu.error import PropertiesOptionError
|
||||
|
||||
|
||||
@ -255,25 +255,6 @@ def test_choice_access_with_multi():
|
||||
assert config.t1 == ["a", "b", "a", "b"]
|
||||
|
||||
|
||||
#____________________________________________________________
|
||||
def test_symlink_option():
|
||||
boolopt = BoolOption("b", "", default=False)
|
||||
linkopt = SymLinkOption("c", boolopt)
|
||||
descr = OptionDescription("opt", "",
|
||||
[linkopt, OptionDescription("s1", "", [boolopt])])
|
||||
config = Config(descr)
|
||||
setattr(config, "s1.b", True)
|
||||
setattr(config, "s1.b", False)
|
||||
assert config.s1.b is False
|
||||
assert config.c is False
|
||||
config.c = True
|
||||
assert config.s1.b is True
|
||||
assert config.c is True
|
||||
config.c = False
|
||||
assert config.s1.b is False
|
||||
assert config.c is False
|
||||
|
||||
|
||||
#____________________________________________________________
|
||||
def test_accepts_multiple_changes_from_option():
|
||||
s = StrOption("string", "", default="string")
|
||||
|
Reference in New Issue
Block a user