mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 06:19:39 +08:00
This test will be removed in the virtualenv branch
This commit is contained in:
@@ -45,5 +45,20 @@ def generate_pyc():
|
|||||||
shutil.copy(os.path.join("dummy_package/__pycache__", f), dst)
|
shutil.copy(os.path.join("dummy_package/__pycache__", f), dst)
|
||||||
|
|
||||||
|
|
||||||
|
# Python 2.6 does not necessarily come with `compileall.compile_file`.
|
||||||
|
@pytest.mark.skipif("sys.version_info > (2,6)")
|
||||||
|
@cwd_at('test/test_evaluate')
|
||||||
|
def test_pyc():
|
||||||
|
"""
|
||||||
|
The list of completion must be greater than 2.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
generate_pyc()
|
||||||
|
s = jedi.Script("from dummy_package import dummy; dummy.", path='blub.py')
|
||||||
|
assert len(s.completions()) >= 2
|
||||||
|
finally:
|
||||||
|
shutil.rmtree("dummy_package")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test_pyc()
|
test_pyc()
|
||||||
|
|||||||
Reference in New Issue
Block a user