rename FileOption to FilenameOption
python 3 support
This commit is contained in:
@ -4,7 +4,7 @@ from py.test import raises
|
||||
|
||||
from tiramisu.config import Config
|
||||
from tiramisu.option import IntOption, FloatOption, StrOption, ChoiceOption, \
|
||||
BoolOption, FileOption, OptionDescription
|
||||
BoolOption, FilenameOption, OptionDescription
|
||||
|
||||
|
||||
def make_description():
|
||||
@ -139,8 +139,8 @@ def test_does_not_find_in_config():
|
||||
raises(AttributeError, "conf.find(byname='IDontExist')")
|
||||
|
||||
|
||||
def test_file():
|
||||
a = FileOption('a', '')
|
||||
def test_filename():
|
||||
a = FilenameOption('a', '')
|
||||
o = OptionDescription('o', '', [a])
|
||||
c = Config(o)
|
||||
c.a = u'/'
|
||||
|
@ -6,7 +6,7 @@ from tiramisu.config import Config, SubConfig
|
||||
from tiramisu.option import ChoiceOption, BoolOption, IntOption, FloatOption,\
|
||||
StrOption, SymLinkOption, UnicodeOption, IPOption, OptionDescription, \
|
||||
PortOption, NetworkOption, NetmaskOption, DomainnameOption, EmailOption, \
|
||||
URLOption, FileOption
|
||||
URLOption, FilenameOption
|
||||
|
||||
|
||||
def test_slots_option():
|
||||
@ -40,7 +40,7 @@ def test_slots_option():
|
||||
raises(AttributeError, "c.x = 1")
|
||||
c = URLOption('a', '')
|
||||
raises(AttributeError, "c.x = 1")
|
||||
c = FileOption('a', '')
|
||||
c = FilenameOption('a', '')
|
||||
raises(AttributeError, "c.x = 1")
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ def test_slots_option_readonly():
|
||||
l = DomainnameOption('l', '')
|
||||
o = EmailOption('o', '')
|
||||
p = URLOption('p', '')
|
||||
q = FileOption('q', '')
|
||||
q = FilenameOption('q', '')
|
||||
m = OptionDescription('m', '', [a, b, c, d, e, g, h, i, j, k, l, o, p, q])
|
||||
a._requires = 'a'
|
||||
b._requires = 'b'
|
||||
|
Reference in New Issue
Block a user