test more sloted options

This commit is contained in:
Emmanuel Garette 2013-08-30 09:40:28 +02:00
parent af50605d73
commit c01f14920d

View File

@ -4,10 +4,13 @@ from py.test import raises
from tiramisu.config import Config, SubConfig
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():
c = ChoiceOption('a', '', ('a',))
raises(AttributeError, "c.x = 1")
c = BoolOption('a', '')
raises(AttributeError, "c.x = 1")
c = IntOption('a', '')
@ -20,10 +23,18 @@ def test_slots_option():
raises(AttributeError, "c.x = 1")
c = UnicodeOption('a', '')
raises(AttributeError, "c.x = 1")
c = ChoiceOption('a', '', ('a',))
c = IPOption('a', '')
raises(AttributeError, "c.x = 1")
c = OptionDescription('a', '', [])
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():