From c01f14920d5d6f63d099684b2106aaf96e26e17e Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 30 Aug 2013 09:40:28 +0200 Subject: [PATCH] test more sloted options --- test/test_slots.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/test_slots.py b/test/test_slots.py index 0104e84..524006f 100644 --- a/test/test_slots.py +++ b/test/test_slots.py @@ -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():