coverage
This commit is contained in:
@ -10,7 +10,6 @@ from tiramisu import BoolOption, StrOption, ChoiceOption, IPOption, \
|
||||
OptionDescription, DynOptionDescription, DynSymLinkOption, submulti, MasterSlaves, \
|
||||
Config, Params, ParamOption, ParamValue
|
||||
from tiramisu.error import PropertiesOptionError, ConfigError, ConflictError
|
||||
from tiramisu.storage import delete_session
|
||||
|
||||
from py.test import raises
|
||||
|
||||
|
@ -27,6 +27,21 @@ def test_list():
|
||||
assert 'test_non_persistent' not in list_sessions('config')
|
||||
|
||||
|
||||
def test_delete_not_persisten():
|
||||
b = BoolOption('b', '')
|
||||
o = OptionDescription('od', '', [b])
|
||||
try:
|
||||
Config(o, session_id='test_persistent', persistent=True)
|
||||
except:
|
||||
c = Config(o, session_id='not_test_persistent')
|
||||
assert list_sessions('all') == ['not_test_persistent']
|
||||
del c
|
||||
assert list_sessions('all') == []
|
||||
#
|
||||
c = Config(o, session_id='not_test_persistent')
|
||||
raises(ValueError, "delete_session('not_test_persistent')")
|
||||
|
||||
|
||||
def test_create_persistent():
|
||||
b = BoolOption('b', '')
|
||||
o = OptionDescription('od', '', [b])
|
||||
|
Reference in New Issue
Block a user