Config: __str__ raise if no str/unicode value
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#this test is much more to test that **it's there** and answers attribute access
|
||||
import autopath
|
||||
from py.test import raises
|
||||
|
||||
from tiramisu.config import Config
|
||||
from tiramisu.option import IntOption, FloatOption, StrOption, ChoiceOption, \
|
||||
BoolOption, OptionDescription
|
||||
BoolOption, UnicodeOption, OptionDescription
|
||||
|
||||
|
||||
def make_description():
|
||||
@ -112,3 +113,15 @@ def test_information_config():
|
||||
string = 'some informations'
|
||||
config.impl_set_information('info', string)
|
||||
assert config.impl_get_information('info') == string
|
||||
|
||||
|
||||
def test_information_display():
|
||||
g1 = IntOption('g1', '', 1)
|
||||
g2 = StrOption('g2', '', 'héhé')
|
||||
g3 = UnicodeOption('g3', '', u'héhé')
|
||||
g4 = BoolOption('g4', '', True)
|
||||
g5 = StrOption('g5', '')
|
||||
d1 = OptionDescription('od', '', [g1, g2, g3, g4, g5])
|
||||
root = OptionDescription('root', '', [d1])
|
||||
config = Config(root)
|
||||
str(config.od)
|
||||
|
Reference in New Issue
Block a user