test more sloted options
This commit is contained in:
parent
af50605d73
commit
c01f14920d
|
@ -4,10 +4,13 @@ from py.test import raises
|
||||||
|
|
||||||
from tiramisu.config import Config, SubConfig
|
from tiramisu.config import Config, SubConfig
|
||||||
from tiramisu.option import ChoiceOption, BoolOption, IntOption, FloatOption, \
|
from tiramisu.option import ChoiceOption, BoolOption, IntOption, FloatOption, \
|
||||||
StrOption, OptionDescription, SymLinkOption, UnicodeOption
|
StrOption, SymLinkOption, UnicodeOption, IPOption, OptionDescription, \
|
||||||
|
PortOption, NetworkOption, NetmaskOption, DomainnameOption
|
||||||
|
|
||||||
|
|
||||||
def test_slots_option():
|
def test_slots_option():
|
||||||
|
c = ChoiceOption('a', '', ('a',))
|
||||||
|
raises(AttributeError, "c.x = 1")
|
||||||
c = BoolOption('a', '')
|
c = BoolOption('a', '')
|
||||||
raises(AttributeError, "c.x = 1")
|
raises(AttributeError, "c.x = 1")
|
||||||
c = IntOption('a', '')
|
c = IntOption('a', '')
|
||||||
|
@ -20,10 +23,18 @@ def test_slots_option():
|
||||||
raises(AttributeError, "c.x = 1")
|
raises(AttributeError, "c.x = 1")
|
||||||
c = UnicodeOption('a', '')
|
c = UnicodeOption('a', '')
|
||||||
raises(AttributeError, "c.x = 1")
|
raises(AttributeError, "c.x = 1")
|
||||||
c = ChoiceOption('a', '', ('a',))
|
c = IPOption('a', '')
|
||||||
raises(AttributeError, "c.x = 1")
|
raises(AttributeError, "c.x = 1")
|
||||||
c = OptionDescription('a', '', [])
|
c = OptionDescription('a', '', [])
|
||||||
raises(AttributeError, "c.x = 1")
|
raises(AttributeError, "c.x = 1")
|
||||||
|
c = PortOption('a', '')
|
||||||
|
raises(AttributeError, "c.x = 1")
|
||||||
|
c = NetworkOption('a', '')
|
||||||
|
raises(AttributeError, "c.x = 1")
|
||||||
|
c = NetmaskOption('a', '')
|
||||||
|
raises(AttributeError, "c.x = 1")
|
||||||
|
c = DomainnameOption('a', '')
|
||||||
|
raises(AttributeError, "c.x = 1")
|
||||||
|
|
||||||
|
|
||||||
def test_slots_config():
|
def test_slots_config():
|
||||||
|
|
Loading…
Reference in New Issue