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:
@ -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)
|
||||
|
Reference in New Issue
Block a user