1
0
forked from VimPlug/jedi

Remove some other _star_import_cache stuff, and with this, #489 should be fixed.

This commit is contained in:
Dave Halter
2014-10-06 17:55:28 +02:00
parent 3638d5149d
commit e9a3a44780
2 changed files with 5 additions and 5 deletions

View File

@@ -33,8 +33,6 @@ from jedi import debug
_time_caches = {}
_star_import_cache = {}
# for fast_parser, should not be deleted
parser_cache = {}
@@ -59,7 +57,6 @@ def clear_time_caches(delete_all=False):
if delete_all:
for cache in _time_caches.values():
cache.clear()
_star_import_cache.clear()
parser_cache.clear()
else:
# normally just kill the expired entries, not all

View File

@@ -67,7 +67,9 @@ def test_star_import_cache_duration():
old, jedi.settings.star_import_cache_validity = \
jedi.settings.star_import_cache_validity, new
cache._star_import_cache = {} # first empty...
dct = cache._time_caches['star_import_cache_validity']
old_dct = dict(dct)
dct.clear() # first empty...
# path needs to be not-None (otherwise caching effects are not visible)
jedi.Script('', 1, 0, '').completions()
time.sleep(2 * new)
@@ -75,7 +77,8 @@ def test_star_import_cache_duration():
# reset values
jedi.settings.star_import_cache_validity = old
assert len(cache._star_import_cache) == 1
assert len(dct) == 1
dct = old_dct
cache._star_import_cache = {}