mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Rename parser.utils to parser.cache.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user