Rename parser.utils to parser.cache.

This commit is contained in:
Dave Halter
2017-03-30 01:57:48 +02:00
parent db364bc44d
commit 35fd1c70bd
9 changed files with 16 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ from textwrap import dedent
from jedi import api
from jedi._compatibility import is_py3
from pytest import raises
from jedi.parser import utils
from jedi.parser import cache
def test_preload_modules():
@@ -17,15 +17,15 @@ def test_preload_modules():
for i in modules:
assert [i in k for k in parser_cache.keys() if k is not None]
temp_cache, utils.parser_cache = utils.parser_cache, {}
parser_cache = utils.parser_cache
temp_cache, cache.parser_cache = cache.parser_cache, {}
parser_cache = cache.parser_cache
api.preload_module('sys')
check_loaded() # compiled (c_builtin) modules shouldn't be in the cache.
api.preload_module('types', 'token')
check_loaded('types', 'token')
utils.parser_cache = temp_cache
cache.parser_cache = temp_cache
def test_empty_script():