mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-14 17:47:05 +08:00
lots of small bugfixes
This commit is contained in:
@@ -8,8 +8,8 @@ from pytest import raises
|
||||
|
||||
def test_preload_modules():
|
||||
def check_loaded(*modules):
|
||||
# + 1 for builtin, +1 for None module (currently used)
|
||||
assert len(new) == len(modules) + 2
|
||||
# +1 for None module (currently used)
|
||||
assert len(new) == len(modules) + 1
|
||||
for i in modules + ('__builtin__',):
|
||||
assert [i in k for k in new.keys() if k is not None]
|
||||
|
||||
@@ -20,9 +20,8 @@ def test_preload_modules():
|
||||
new['__builtin__'] = temp_cache['__builtin__']
|
||||
|
||||
api.preload_module('datetime')
|
||||
check_loaded('datetime')
|
||||
api.preload_module('json', 'token')
|
||||
check_loaded('datetime', 'json', 'token')
|
||||
check_loaded('json', 'token')
|
||||
|
||||
cache.parser_cache = temp_cache
|
||||
|
||||
|
||||
Reference in New Issue
Block a user