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():

View File

@@ -9,7 +9,7 @@ import pytest
import jedi
from jedi import settings, cache
from jedi.parser.utils import _NodeCacheItem
from jedi.parser.cache import _NodeCacheItem
from jedi.parser.python import load_grammar

View File

@@ -6,7 +6,7 @@ import jedi
from jedi import debug
from jedi.common import splitlines
from jedi import cache
from jedi.parser.utils import parser_cache
from jedi.parser.cache import parser_cache
from jedi.parser.python import load_grammar
from jedi.parser.python.diff import DiffParser
from jedi.parser.python import parse