diff --git a/test/test_regression.py b/test/test_regression.py index b327811c..2e0da3cf 100755 --- a/test/test_regression.py +++ b/test/test_regression.py @@ -11,6 +11,8 @@ import itertools import os import textwrap +import pytest + from .base import TestBase, unittest, cwd_at import jedi @@ -524,5 +526,16 @@ class TestSpeed(TestBase): script.function_definition() #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__': unittest.main() diff --git a/tox.ini b/tox.ini index 9ab832ab..25014940 100644 --- a/tox.ini +++ b/tox.ini @@ -20,5 +20,6 @@ deps = [testenv:py32] # TODO: Without this setting, test uses ~/.cache/jedi/. # There could be a bug due to import hack. +# See test_settings_module in test/test_regression.py. setenv = XDG_CACHE_HOME={envtmpdir}/cache