mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Add a failing test due to import hack
This commit is contained in:
@@ -11,6 +11,8 @@ import itertools
|
|||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from .base import TestBase, unittest, cwd_at
|
from .base import TestBase, unittest, cwd_at
|
||||||
|
|
||||||
import jedi
|
import jedi
|
||||||
@@ -524,5 +526,16 @@ class TestSpeed(TestBase):
|
|||||||
script.function_definition()
|
script.function_definition()
|
||||||
#print(jedi.imports.imports_processed)
|
#print(jedi.imports.imports_processed)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif("sys.version_info >= (3,0)")
|
||||||
|
def test_settings_module():
|
||||||
|
"""
|
||||||
|
jedi.settings and jedi.cache.settings must be the same module.
|
||||||
|
"""
|
||||||
|
from jedi import cache
|
||||||
|
from jedi import settings
|
||||||
|
assert cache.settings is settings
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
1
tox.ini
1
tox.ini
@@ -20,5 +20,6 @@ deps =
|
|||||||
[testenv:py32]
|
[testenv:py32]
|
||||||
# TODO: Without this setting, test uses ~/.cache/jedi/.
|
# TODO: Without this setting, test uses ~/.cache/jedi/.
|
||||||
# There could be a bug due to import hack.
|
# There could be a bug due to import hack.
|
||||||
|
# See test_settings_module in test/test_regression.py.
|
||||||
setenv =
|
setenv =
|
||||||
XDG_CACHE_HOME={envtmpdir}/cache
|
XDG_CACHE_HOME={envtmpdir}/cache
|
||||||
|
|||||||
Reference in New Issue
Block a user