in __setattr__, name should never be object's variable name

remove context in type_ find's option
find_first_context return AttributError if no results
This commit is contained in:
2013-08-24 21:26:10 +02:00
parent 6708fe4522
commit 4c27cb586d
6 changed files with 42 additions and 31 deletions

View File

@ -136,6 +136,17 @@ def test_reset_cache():
assert 'u2' not in settings._p_.get_cached('property', c)
def test_reset_cache_subconfig():
od1 = make_description()
od2 = OptionDescription('od2', '', [od1])
c = Config(od2)
values = c.cfgimpl_get_values()
c.od1.u1
assert 'od1.u1' in values._p_.get_cached('value', c)
c.od1.cfgimpl_reset_cache()
assert 'od1.u1' not in values._p_.get_cached('value', c)
def test_reset_cache_only_expired():
od1 = make_description()
c = Config(od1)