cache in sql works

This commit is contained in:
2014-02-01 16:26:23 +01:00
parent 02a987b39d
commit 313b03b246
5 changed files with 143 additions and 114 deletions

View File

@ -65,17 +65,19 @@ def test_deref_optiondescription():
#assert w() is None
def test_deref_option_cache():
b = BoolOption('b', '')
o = OptionDescription('od', '', [b])
o.impl_build_cache_option()
w = weakref.ref(b)
del(b)
assert w() is not None
del(o)
#FIXME l'objet n'est plus en mémoire mais par contre reste dans la base
#Voir comment supprimer (et quand)
#assert w() is None
#def test_deref_option_cache():
# FIXME quand c'est un dico, il faut garder la reference
# mais la comme c'est dans la base, forcement c'est dereference
# b = BoolOption('b', '')
# o = OptionDescription('od', '', [b])
# o.impl_build_cache_option()
# w = weakref.ref(b)
# del(b)
# assert w() is not None
# del(o)
# #FIXME l'objet n'est plus en mémoire mais par contre reste dans la base
# #Voir comment supprimer (et quand)
# #assert w() is None
def test_deref_optiondescription_cache():
@ -90,18 +92,18 @@ def test_deref_optiondescription_cache():
#assert w() is None
def test_deref_option_config():
b = BoolOption('b', '')
o = OptionDescription('od', '', [b])
c = Config(o)
w = weakref.ref(b)
del(b)
assert w() is not None
del(o)
assert w() is not None
del(c)
#FIXME meme chose
#assert w() is None
#def test_deref_option_config():
# b = BoolOption('b', '')
# o = OptionDescription('od', '', [b])
# c = Config(o)
# w = weakref.ref(b)
# del(b)
# assert w() is not None
# del(o)
# assert w() is not None
# del(c)
# #FIXME meme chose
# #assert w() is None
#FIXME rien a voir mais si je fais un config.impl_get_path_by_opt() ca me retourne la methode !