python 3.5 support
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu import setting, value
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.setting import owners
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
"""theses tests are much more to test that config, option description, vs...
|
||||
**it's there** and answers via attribute access"""
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
"configuration objects global API"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
import warnings, sys
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
import warnings
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.config import Config, GroupConfig, MetaConfig
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.setting import groups
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.setting import groups, owners
|
||||
|
@ -1,6 +1,6 @@
|
||||
# coding: utf-8
|
||||
"frozen and hidden values"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.value import Multi
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""these tests are here to create some :class:`tiramisu.option.Option`'s
|
||||
and to compare them
|
||||
"""
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
@ -1083,9 +1083,9 @@ def test_callback_raise():
|
||||
cfg.read_write()
|
||||
try:
|
||||
cfg.od1.opt1
|
||||
except ConfigError, err:
|
||||
except ConfigError as err:
|
||||
assert '"Option 1"' in str(err)
|
||||
try:
|
||||
cfg.od2.opt2
|
||||
except ConfigError, err:
|
||||
except ConfigError as err:
|
||||
assert '"Option 2"' in str(err)
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
"test all types of option default values for options, add new option in a descr"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
"config.set() or config.setoption() or option.setoption()"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
@ -564,10 +564,11 @@ def test_pprint():
|
||||
setting = config.cfgimpl_get_settings()
|
||||
config.read_write()
|
||||
config.int = 1
|
||||
err = None
|
||||
try:
|
||||
config.str
|
||||
except Exception, err:
|
||||
pass
|
||||
except Exception as error:
|
||||
err = error
|
||||
|
||||
list_disabled_1 = 'disabled (' + display_list([msg_is.format('string2', 'string'), msg_is.format('Test int option', '1')]) + ')'
|
||||
list_disabled_2 = 'disabled (' + display_list([msg_is.format('Test int option', '1'), msg_is.format('string2', 'string')]) + ')'
|
||||
@ -578,17 +579,20 @@ def test_pprint():
|
||||
comp4 = str(err) == _(msg_error.format('option', 'Test string option', properties, display_list([list_hidden, list_disabled_2])))
|
||||
assert comp1 or comp2 or comp3 or comp4
|
||||
|
||||
err = None
|
||||
try:
|
||||
config.options.val2
|
||||
except Exception, err:
|
||||
pass
|
||||
except Exception as error:
|
||||
err = error
|
||||
|
||||
assert str(err) == msg_error.format('optiondescription', 'options', prop, 'hidden (' + msg_is.format('Test int option', 1) + ')')
|
||||
|
||||
err = None
|
||||
try:
|
||||
config.val3
|
||||
except Exception, err:
|
||||
pass
|
||||
except Exception as error:
|
||||
err = error
|
||||
|
||||
msg_1 = msg_is.format('string2', 'string')
|
||||
msg_2 = msg_is.format('Test int option', 1)
|
||||
msg_3 = msg_is_not.format('Test int option', display_list([2, 3, 4], 'or'))
|
||||
@ -607,16 +611,18 @@ def test_pprint():
|
||||
comp6 = str(err) == msg_error.format('option', 'val3', prop, list_hidden)
|
||||
assert comp1 or comp2 or comp3 or comp4 or comp5 or comp6
|
||||
|
||||
err = None
|
||||
try:
|
||||
config.string
|
||||
except Exception, err:
|
||||
pass
|
||||
except Exception as error:
|
||||
err = error
|
||||
|
||||
assert str(err) == msg_error.format('option', 'string', properties, display_list(['disabled', 'hidden']))
|
||||
|
||||
err = None
|
||||
try:
|
||||
config.string3
|
||||
except Exception, err:
|
||||
pass
|
||||
except Exception as error:
|
||||
err = error
|
||||
|
||||
assert str(err) == msg_error.format('option', 'string3', prop, 'hidden')
|
||||
|
@ -1,6 +1,6 @@
|
||||
# coding: utf-8
|
||||
"frozen and hidden values"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
"configuration objects global API"
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
import warnings
|
||||
@ -97,7 +97,7 @@ def test_validator():
|
||||
raises(ValueError, "cfg.opt2 = 'val'")
|
||||
try:
|
||||
cfg.opt2 = 'val'
|
||||
except ValueError, err:
|
||||
except ValueError as err:
|
||||
msg = _('"{0}" is an invalid {1} for "{2}", {3}').format('val', _('string'), 'opt2', 'test error')
|
||||
assert str(err) == msg
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#this test is much more to test that **it's there** and answers attribute access
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.setting import groups, owners
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from copy import copy
|
||||
|
@ -1,5 +1,5 @@
|
||||
## coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from py.test import raises
|
||||
@ -11,7 +11,7 @@ from tiramisu.option import ChoiceOption, BoolOption, IntOption, FloatOption,\
|
||||
URLOption, FilenameOption
|
||||
|
||||
|
||||
print "FIXME slot pour un masterslaves !!"
|
||||
#FIXME slot pour un masterslaves !!
|
||||
|
||||
|
||||
def test_slots_option():
|
||||
|
@ -1,4 +1,4 @@
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.option import BoolOption, UnicodeOption, SymLinkOption, \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
#from py.test import raises
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.setting import groups, owners
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from autopath import do_autopath
|
||||
from .autopath import do_autopath
|
||||
do_autopath()
|
||||
|
||||
from tiramisu.option import BoolOption, StrOption, SymLinkOption, \
|
||||
|
Reference in New Issue
Block a user