don't check 'mandatory' setting for symlink
This commit is contained in:
@ -485,10 +485,10 @@ def test_mandatory_warnings_symlink():
|
||||
setting = config.cfgimpl_get_settings()
|
||||
config.read_write()
|
||||
config.str
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'str3']
|
||||
setting[descr.str].append('frozen')
|
||||
config.read_only()
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'unicode2', 'str3']
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings()) == ['str', 'str1', 'str3']
|
||||
|
||||
|
||||
def test_mandatory_warnings_validate():
|
||||
@ -496,10 +496,10 @@ def test_mandatory_warnings_validate():
|
||||
config = Config(descr)
|
||||
config.str = ''
|
||||
raises(ValueError, "list(config.cfgimpl_get_values().mandatory_warnings())")
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str', 'str1', 'unicode2', 'str3', 'unicode1', 'int1']
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str', 'str1', 'str3', 'unicode1', 'int1']
|
||||
config.str = 'test'
|
||||
raises(ValueError, "list(config.cfgimpl_get_values().mandatory_warnings())")
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str1', 'unicode2', 'str3']
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str1', 'str3']
|
||||
|
||||
|
||||
def test_mandatory_warnings_validate_empty():
|
||||
@ -508,7 +508,7 @@ def test_mandatory_warnings_validate_empty():
|
||||
config.str = ''
|
||||
config.read_only()
|
||||
raises(ConfigError, "list(config.cfgimpl_get_values().mandatory_warnings())")
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str', 'str1', 'unicode2', 'str3', 'unicode1']
|
||||
assert list(config.cfgimpl_get_values().mandatory_warnings(validate=False)) == ['str', 'str1', 'str3', 'unicode1']
|
||||
|
||||
|
||||
def test_mandatory_warnings_requires():
|
||||
|
Reference in New Issue
Block a user