add more tests

This commit is contained in:
2013-12-09 18:56:29 +01:00
parent 1e880f4bc6
commit c58de18b62
5 changed files with 103 additions and 2 deletions

View File

@ -8,6 +8,17 @@ from tiramisu.option import IPOption, NetworkOption, NetmaskOption, IntOption,\
from tiramisu.error import ConfigError
def test_consistency():
a = IntOption('a', '')
b = IntOption('b', '')
od = OptionDescription('od', '', [a, b])
a.impl_add_consistency('not_equal', b)
#consistency to itself
raises(ConfigError, "a.impl_add_consistency('not_equal', a)")
#consistency with string
raises(ConfigError, "a.impl_add_consistency('not_equal', 'a')")
def test_consistency_not_equal():
a = IntOption('a', '')
b = IntOption('b', '')