tests on frozen and None value

This commit is contained in:
gwen
2012-09-19 09:31:02 +02:00
parent f50935523f
commit b2e97573bd
4 changed files with 21 additions and 86 deletions

View File

@ -74,6 +74,7 @@ def test_frozen_value():
s = StrOption("string", "", default="string")
descr = OptionDescription("options", "", [s])
config = Config(descr)
config.cfgimpl_freeze()
s.freeze()
raises(TypeError, 'config.string = "egg"')
@ -82,7 +83,9 @@ def test_freeze():
descr = make_description()
conf = Config(descr)
conf.cfgimpl_freeze()
raises(TypeError, "conf.gc.name = 'try to modify'")
name = conf.unwrap_from_path("gc.name")
name.freeze()
raises(TypeError, "conf.gc.name = 'framework'")
# ____________________________________________________________
def test_is_hidden():
descr = make_description()