Arity change, remove force_properties:

* tiramisu/config.py (in cfgimpl_get_home_by_path and getattr)
 * tiramisu/value.py (in getitem):
This commit is contained in:
2014-04-12 21:37:20 +02:00
parent cd4d3527c7
commit 3ab0688c46
4 changed files with 48 additions and 47 deletions

View File

@ -1,4 +1,5 @@
import autopath
from time import sleep
#from py.test import raises
from tiramisu.config import Config
@ -205,11 +206,12 @@ def test_mandatory_warnings_ro():
except PropertiesOptionError as err:
proc = err.proptype
assert proc == ['mandatory']
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str', 'str1', 'unicode2', 'str3']
config.read_write()
config.str = 'a'
config.read_only()
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str1', 'unicode2', 'str3']
sleep(.1)
def test_mandatory_warnings_rw():
@ -218,9 +220,10 @@ def test_mandatory_warnings_rw():
config.str = ''
config.read_write()
config.str
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str', 'str1', 'unicode2', 'str3']
config.str = 'a'
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str1', 'unicode2', 'str3']
sleep(.1)
def test_mandatory_warnings_disabled():
@ -230,9 +233,10 @@ def test_mandatory_warnings_disabled():
setting = config.cfgimpl_get_settings()
config.read_write()
config.str
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str', 'str1', 'unicode2', 'str3']
setting[descr.str].append('disabled')
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str1', 'unicode2', 'str3']
sleep(.1)
def test_mandatory_warnings_frozen():
@ -242,7 +246,8 @@ def test_mandatory_warnings_frozen():
setting = config.cfgimpl_get_settings()
config.read_write()
config.str
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str', 'str1', 'unicode2', 'str3']
setting[descr.str].append('frozen')
config.read_only()
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
assert config.cfgimpl_get_values().mandatory_warnings() == ['str', 'str1', 'unicode2', 'str3']
sleep(.1)