Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 585674 Details for
Bug 691432
dev-python/jedi-0.12.1 fails tests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
dev-python/jedi-0.12.1:20190804-164302.log
jedi-0.12.1:20190804-164302.log (text/plain), 602.62 KB, created by
eroen
on 2019-08-04 17:19:45 UTC
(
hide
)
Description:
dev-python/jedi-0.12.1:20190804-164302.log
Filename:
MIME Type:
Creator:
eroen
Created:
2019-08-04 17:19:45 UTC
Size:
602.62 KB
patch
obsolete
> * Package: dev-python/jedi-0.12.1 > * Repository: gentoo > * Maintainer: python@gentoo.org > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python2_7 python_targets_python3_5 python_targets_python3_6 python_targets_python3_7 test userland_GNU > * FEATURES: compressdebug installsources network-sandbox preserve-libs sandbox splitdebug test userpriv usersandbox >>>> Unpacking source... >>>> Unpacking jedi-0.12.1.tar.gz to /var/tmp/portage/dev-python/jedi-0.12.1/work >>>> Source unpacked in /var/tmp/portage/dev-python/jedi-0.12.1/work >>>> Preparing source in /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1 ... >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1 ... > * python2_7: running distutils-r1_run_phase distutils-r1_python_compile >python2.7 setup.py build >running build >running build_py >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/_compatibility.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/parser_utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/debug.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/settings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/refactoring.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >copying jedi/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/common >copying jedi/common/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/common >copying jedi/common/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/common >copying jedi/common/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/common >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/classes.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/exceptions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/completion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/environment.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/replstartup.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/keywords.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/project.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >copying jedi/api/interpreter.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/api >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/pep0484.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/usages.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/dynamic.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/jedi_typing.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/lazy_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/imports.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/stdlib.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/sys_path.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/base_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/flow_analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/arguments.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/syntax_tree.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/docstrings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/parser_cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/finder.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/filters.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/param.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >copying jedi/evaluate/recursion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/instance.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/klass.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/module.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/function.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/iterable.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/namespace.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/asynchronous.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/context >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/getattr_static.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/mixed.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/fake.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/access.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/functions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/subprocess >running egg_info >creating jedi.egg-info >writing requirements to jedi.egg-info/requires.txt >writing jedi.egg-info/PKG-INFO >writing top-level names to jedi.egg-info/top_level.txt >writing dependency_links to jedi.egg-info/dependency_links.txt >writing manifest file 'jedi.egg-info/SOURCES.txt' >reading manifest file 'jedi.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >warning: no files found matching 'jedi/parser/python/grammar*.txt' >warning: no previously-included files matching '*.pyc' found under directory '*' >writing manifest file 'jedi.egg-info/SOURCES.txt' >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sqlite3.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/builtins.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/io.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/posix.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/operator.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_functools.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_weakref.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/datetime.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sre.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python2_7/lib/jedi/evaluate/compiled/fake >warning: build_py: byte-compiling is disabled, skipping. > > * python3_5: running distutils-r1_run_phase distutils-r1_python_compile >python3.5 setup.py build >running build >running build_py >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/_compatibility.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/parser_utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/debug.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/settings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/refactoring.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >copying jedi/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/common >copying jedi/common/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/common >copying jedi/common/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/common >copying jedi/common/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/common >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/classes.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/exceptions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/completion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/environment.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/replstartup.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/keywords.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/project.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >copying jedi/api/interpreter.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/api >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/pep0484.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/usages.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/dynamic.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/jedi_typing.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/lazy_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/imports.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/stdlib.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/sys_path.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/base_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/flow_analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/arguments.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/syntax_tree.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/docstrings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/parser_cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/finder.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/filters.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/param.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >copying jedi/evaluate/recursion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/instance.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/klass.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/module.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/function.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/iterable.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/namespace.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >copying jedi/evaluate/context/asynchronous.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/context >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/getattr_static.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/mixed.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/fake.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/access.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/functions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/subprocess >running egg_info >writing requirements to jedi.egg-info/requires.txt >writing dependency_links to jedi.egg-info/dependency_links.txt >writing top-level names to jedi.egg-info/top_level.txt >writing jedi.egg-info/PKG-INFO >reading manifest file 'jedi.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >warning: no files found matching 'jedi/parser/python/grammar*.txt' >warning: no previously-included files matching '*.pyc' found under directory '*' >writing manifest file 'jedi.egg-info/SOURCES.txt' >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sqlite3.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/builtins.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/io.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/posix.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/operator.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_functools.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_weakref.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/datetime.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sre.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_5/lib/jedi/evaluate/compiled/fake >warning: build_py: byte-compiling is disabled, skipping. > > * python3_6: running distutils-r1_run_phase distutils-r1_python_compile >python3.6 setup.py build >running build >running build_py >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/_compatibility.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/parser_utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/debug.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/settings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/refactoring.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >copying jedi/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/common >copying jedi/common/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/common >copying jedi/common/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/common >copying jedi/common/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/common >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/classes.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/exceptions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/completion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/environment.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/replstartup.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/keywords.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/project.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >copying jedi/api/interpreter.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/api >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/pep0484.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/usages.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/dynamic.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/jedi_typing.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/lazy_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/imports.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/stdlib.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/sys_path.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/base_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/flow_analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/arguments.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/syntax_tree.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/docstrings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/parser_cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/finder.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/filters.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/param.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >copying jedi/evaluate/recursion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/instance.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/klass.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/module.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/function.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/iterable.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/namespace.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >copying jedi/evaluate/context/asynchronous.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/context >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/getattr_static.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/mixed.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/fake.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/access.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/functions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/subprocess >running egg_info >writing jedi.egg-info/PKG-INFO >writing dependency_links to jedi.egg-info/dependency_links.txt >writing requirements to jedi.egg-info/requires.txt >writing top-level names to jedi.egg-info/top_level.txt >reading manifest file 'jedi.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >warning: no files found matching 'jedi/parser/python/grammar*.txt' >warning: no previously-included files matching '*.pyc' found under directory '*' >writing manifest file 'jedi.egg-info/SOURCES.txt' >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sqlite3.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/builtins.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/io.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/posix.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/operator.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_functools.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_weakref.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/datetime.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sre.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_6/lib/jedi/evaluate/compiled/fake >warning: build_py: byte-compiling is disabled, skipping. > > * python3_7: running distutils-r1_run_phase distutils-r1_python_compile >python3.7 setup.py build -j 4 >running build >running build_py >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/_compatibility.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/parser_utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/debug.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/settings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/refactoring.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >copying jedi/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/common >copying jedi/common/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/common >copying jedi/common/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/common >copying jedi/common/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/common >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/classes.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/exceptions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/completion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/environment.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/replstartup.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/keywords.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/project.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >copying jedi/api/interpreter.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/api >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/pep0484.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/usages.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/dynamic.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/jedi_typing.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/lazy_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/imports.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/stdlib.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/sys_path.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/base_context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/flow_analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/arguments.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/utils.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/syntax_tree.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/docstrings.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/analysis.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/helpers.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/parser_cache.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/finder.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/filters.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/param.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >copying jedi/evaluate/recursion.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/instance.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/klass.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/module.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/function.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/iterable.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/namespace.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >copying jedi/evaluate/context/asynchronous.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/context >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/getattr_static.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/mixed.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/context.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/fake.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >copying jedi/evaluate/compiled/access.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__init__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/functions.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/subprocess >copying jedi/evaluate/compiled/subprocess/__main__.py -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/subprocess >running egg_info >writing jedi.egg-info/PKG-INFO >writing dependency_links to jedi.egg-info/dependency_links.txt >writing requirements to jedi.egg-info/requires.txt >writing top-level names to jedi.egg-info/top_level.txt >reading manifest file 'jedi.egg-info/SOURCES.txt' >reading manifest template 'MANIFEST.in' >warning: no files found matching 'jedi/parser/python/grammar*.txt' >warning: no previously-included files matching '*.pyc' found under directory '*' >writing manifest file 'jedi.egg-info/SOURCES.txt' >creating /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sqlite3.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/builtins.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/io.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/posix.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/operator.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_functools.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_weakref.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/datetime.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >copying jedi/evaluate/compiled/fake/_sre.pym -> /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1-python3_7/lib/jedi/evaluate/compiled/fake >warning: build_py: byte-compiling is disabled, skipping. > > * python3_7: running distutils-r1_run_phase python_compile_all >>>> Source compiled. >>>> Test phase: dev-python/jedi-0.12.1 > * python2_7: running distutils-r1_run_phase python_test >============================================= test session starts ============================================== >platform linux2 -- Python 2.7.16, pytest-3.8.2, py-1.5.4, pluggy-0.7.1 -- /usr/bin/python2.7 >cachedir: .pytest_cache >hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/.hypothesis/examples') >rootdir: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1, inifile: pytest.ini >plugins: xprocess-0.12.1, xdist-1.23.2, virtualenv-1.2.11, shutil-1.2.11, localserver-0.3.7, forked-0.2, flake8-0.9.1, cov-2.5.1, hypothesis-4.15.0, backports.unittest-mock-1.4 >collecting ... collected 1714 items > >jedi/__init__.py::jedi PASSED [ 0%] >jedi/api/__init__.py::jedi.api.Interpreter PASSED [ 0%] >jedi/api/classes.py::jedi.api.classes.BaseDefinition.docstring PASSED [ 0%] >jedi/api/classes.py::jedi.api.classes.BaseDefinition.full_name PASSED [ 0%] >jedi/api/classes.py::jedi.api.classes.BaseDefinition.module_name PASSED [ 0%] >jedi/api/classes.py::jedi.api.classes.BaseDefinition.type PASSED [ 0%] >jedi/api/classes.py::jedi.api.classes.Definition.description PASSED [ 0%] >jedi/api/replstartup.py::jedi.api.replstartup PASSED [ 0%] >jedi/evaluate/docstrings.py::jedi.evaluate.docstrings._search_param_in_docstr PASSED [ 0%] >jedi/evaluate/docstrings.py::jedi.evaluate.docstrings._strip_rst_role PASSED [ 0%] >jedi/evaluate/filters.py::jedi.evaluate.filters.get_global_filters PASSED [ 0%] >test/conftest.py::test.conftest.parse_test_files_option PASSED [ 0%] >test/test_cache.py::test_cache_call_signatures PASSED [ 0%] >test/test_cache.py::test_cache_line_split_issues PASSED [ 0%] >test/test_compatibility.py::test_highest_pickle_protocol PASSED [ 0%] >test/test_debug.py::test_simple PASSED [ 0%] >test/test_integration.py::test_completion[classes:3] PASSED [ 0%] >test/test_integration.py::test_completion[classes:6] PASSED [ 1%] >test/test_integration.py::test_completion[classes:10] PASSED [ 1%] >test/test_integration.py::test_completion[classes:13] PASSED [ 1%] >test/test_integration.py::test_completion[classes:17] PASSED [ 1%] >test/test_integration.py::test_completion[classes:20] PASSED [ 1%] >test/test_integration.py::test_completion[classes:23] PASSED [ 1%] >test/test_integration.py::test_completion[classes:25] PASSED [ 1%] >test/test_integration.py::test_completion[classes:51] PASSED [ 1%] >test/test_integration.py::test_completion[classes:53] PASSED [ 1%] >test/test_integration.py::test_completion[classes:58] PASSED [ 1%] >test/test_integration.py::test_completion[classes:60] PASSED [ 1%] >test/test_integration.py::test_completion[classes:65] PASSED [ 1%] >test/test_integration.py::test_completion[classes:67] PASSED [ 1%] >test/test_integration.py::test_completion[classes:69] PASSED [ 1%] >test/test_integration.py::test_completion[classes:75] PASSED [ 1%] >test/test_integration.py::test_completion[classes:78] PASSED [ 1%] >test/test_integration.py::test_completion[classes:81] PASSED [ 1%] >test/test_integration.py::test_completion[classes:83] PASSED [ 2%] >test/test_integration.py::test_completion[classes:86] PASSED [ 2%] >test/test_integration.py::test_completion[classes:89] PASSED [ 2%] >test/test_integration.py::test_completion[classes:91] PASSED [ 2%] >test/test_integration.py::test_completion[classes:95] PASSED [ 2%] >test/test_integration.py::test_completion[classes:97] PASSED [ 2%] >test/test_integration.py::test_completion[classes:101] PASSED [ 2%] >test/test_integration.py::test_completion[classes:105] PASSED [ 2%] >test/test_integration.py::test_completion[classes:107] PASSED [ 2%] >test/test_integration.py::test_completion[classes:111] PASSED [ 2%] >test/test_integration.py::test_completion[classes:113] PASSED [ 2%] >test/test_integration.py::test_completion[classes:119] PASSED [ 2%] >test/test_integration.py::test_completion[classes:121] PASSED [ 2%] >test/test_integration.py::test_completion[classes:124] PASSED [ 2%] >test/test_integration.py::test_completion[classes:131] PASSED [ 2%] >test/test_integration.py::test_completion[classes:135] PASSED [ 2%] >test/test_integration.py::test_completion[classes:137] PASSED [ 2%] >test/test_integration.py::test_completion[classes:139] PASSED [ 3%] >test/test_integration.py::test_completion[classes:142] PASSED [ 3%] >test/test_integration.py::test_completion[classes:165] PASSED [ 3%] >test/test_integration.py::test_completion[classes:176] PASSED [ 3%] >test/test_integration.py::test_completion[classes:178] PASSED [ 3%] >test/test_integration.py::test_completion[classes:180] PASSED [ 3%] >test/test_integration.py::test_completion[classes:183] PASSED [ 3%] >test/test_integration.py::test_completion[classes:185] PASSED [ 3%] >test/test_integration.py::test_completion[classes:187] PASSED [ 3%] >test/test_integration.py::test_completion[classes:197] PASSED [ 3%] >test/test_integration.py::test_completion[classes:199] PASSED [ 3%] >test/test_integration.py::test_completion[classes:215] PASSED [ 3%] >test/test_integration.py::test_completion[classes:235] PASSED [ 3%] >test/test_integration.py::test_completion[classes:237] PASSED [ 3%] >test/test_integration.py::test_completion[classes:239] PASSED [ 3%] >test/test_integration.py::test_completion[classes:241] PASSED [ 3%] >test/test_integration.py::test_completion[classes:252] PASSED [ 3%] >test/test_integration.py::test_completion[classes:271] PASSED [ 4%] >test/test_integration.py::test_completion[classes:273] PASSED [ 4%] >test/test_integration.py::test_completion[classes:275] PASSED [ 4%] >test/test_integration.py::test_completion[classes:278] PASSED [ 4%] >test/test_integration.py::test_completion[classes:287] PASSED [ 4%] >test/test_integration.py::test_completion[classes:289] PASSED [ 4%] >test/test_integration.py::test_completion[classes:299] PASSED [ 4%] >test/test_integration.py::test_completion[classes:301] PASSED [ 4%] >test/test_integration.py::test_completion[classes:313] PASSED [ 4%] >test/test_integration.py::test_completion[classes:323] PASSED [ 4%] >test/test_integration.py::test_completion[classes:345] PASSED [ 4%] >test/test_integration.py::test_completion[classes:347] PASSED [ 4%] >test/test_integration.py::test_completion[classes:350] PASSED [ 4%] >test/test_integration.py::test_completion[classes:352] PASSED [ 4%] >test/test_integration.py::test_completion[classes:359] PASSED [ 4%] >test/test_integration.py::test_completion[classes:361] PASSED [ 4%] >test/test_integration.py::test_completion[classes:365] PASSED [ 4%] >test/test_integration.py::test_completion[classes:367] PASSED [ 5%] >test/test_integration.py::test_completion[classes:369] PASSED [ 5%] >test/test_integration.py::test_completion[classes:371] PASSED [ 5%] >test/test_integration.py::test_completion[classes:373] PASSED [ 5%] >test/test_integration.py::test_completion[classes:392] PASSED [ 5%] >test/test_integration.py::test_completion[classes:395] PASSED [ 5%] >test/test_integration.py::test_completion[classes:402] PASSED [ 5%] >test/test_integration.py::test_completion[classes:412] PASSED [ 5%] >test/test_integration.py::test_completion[classes:414] PASSED [ 5%] >test/test_integration.py::test_completion[classes:422] PASSED [ 5%] >test/test_integration.py::test_completion[classes:424] PASSED [ 5%] >test/test_integration.py::test_completion[classes:426] PASSED [ 5%] >test/test_integration.py::test_completion[classes:428] PASSED [ 5%] >test/test_integration.py::test_completion[classes:434] PASSED [ 5%] >test/test_integration.py::test_completion[classes:438] PASSED [ 5%] >test/test_integration.py::test_completion[classes:441] PASSED [ 5%] >test/test_integration.py::test_completion[classes:454] PASSED [ 5%] >test/test_integration.py::test_completion[classes:457] PASSED [ 6%] >test/test_integration.py::test_completion[classes:459] PASSED [ 6%] >test/test_integration.py::test_completion[classes:462] PASSED [ 6%] >test/test_integration.py::test_completion[classes:465] PASSED [ 6%] >test/test_integration.py::test_completion[classes:469] PASSED [ 6%] >test/test_integration.py::test_completion[classes:472] PASSED [ 6%] >test/test_integration.py::test_completion[classes:484] PASSED [ 6%] >test/test_integration.py::test_completion[classes:497] PASSED [ 6%] >test/test_integration.py::test_completion[classes:503] PASSED [ 6%] >test/test_integration.py::test_completion[classes:513] PASSED [ 6%] >test/test_integration.py::test_completion[classes:515] PASSED [ 6%] >test/test_integration.py::test_completion[classes:526] PASSED [ 6%] >test/test_integration.py::test_completion[classes:528] PASSED [ 6%] >test/test_integration.py::test_completion[classes:530] PASSED [ 6%] >test/test_integration.py::test_completion[classes:532] PASSED [ 6%] >test/test_integration.py::test_completion[classes:545] PASSED [ 6%] >test/test_integration.py::test_completion[classes:548] PASSED [ 6%] >test/test_integration.py::test_completion[classes:563] PASSED [ 7%] >test/test_integration.py::test_completion[classes:565] PASSED [ 7%] >test/test_integration.py::test_completion[classes:572] FAILED [ 7%] >test/test_integration.py::test_completion[usages:6] PASSED [ 7%] >test/test_integration.py::test_completion[usages:9] PASSED [ 7%] >test/test_integration.py::test_completion[usages:23] PASSED [ 7%] >test/test_integration.py::test_completion[usages:31] PASSED [ 7%] >test/test_integration.py::test_completion[usages:33] PASSED [ 7%] >test/test_integration.py::test_completion[usages:39] PASSED [ 7%] >test/test_integration.py::test_completion[usages:41] PASSED [ 7%] >test/test_integration.py::test_completion[usages:44] PASSED [ 7%] >test/test_integration.py::test_completion[usages:46] PASSED [ 7%] >test/test_integration.py::test_completion[usages:52] PASSED [ 7%] >test/test_integration.py::test_completion[usages:57] PASSED [ 7%] >test/test_integration.py::test_completion[usages:62] PASSED [ 7%] >test/test_integration.py::test_completion[usages:68] PASSED [ 7%] >test/test_integration.py::test_completion[usages:72] PASSED [ 7%] >test/test_integration.py::test_completion[usages:79] PASSED [ 7%] >test/test_integration.py::test_completion[usages:82] PASSED [ 8%] >test/test_integration.py::test_completion[usages:86] PASSED [ 8%] >test/test_integration.py::test_completion[usages:89] PASSED [ 8%] >test/test_integration.py::test_completion[usages:92] PASSED [ 8%] >test/test_integration.py::test_completion[usages:94] PASSED [ 8%] >test/test_integration.py::test_completion[usages:97] PASSED [ 8%] >test/test_integration.py::test_completion[usages:100] PASSED [ 8%] >test/test_integration.py::test_completion[usages:111] PASSED [ 8%] >test/test_integration.py::test_completion[usages:113] PASSED [ 8%] >test/test_integration.py::test_completion[usages:115] PASSED [ 8%] >test/test_integration.py::test_completion[usages:123] PASSED [ 8%] >test/test_integration.py::test_completion[usages:128] PASSED [ 8%] >test/test_integration.py::test_completion[usages:130] PASSED [ 8%] >test/test_integration.py::test_completion[usages:132] PASSED [ 8%] >test/test_integration.py::test_completion[usages:137] PASSED [ 8%] >test/test_integration.py::test_completion[usages:141] PASSED [ 8%] >test/test_integration.py::test_completion[usages:162] PASSED [ 8%] >test/test_integration.py::test_completion[usages:164] PASSED [ 9%] >test/test_integration.py::test_completion[usages:167] PASSED [ 9%] >test/test_integration.py::test_completion[usages:169] PASSED [ 9%] >test/test_integration.py::test_completion[usages:171] PASSED [ 9%] >test/test_integration.py::test_completion[usages:174] PASSED [ 9%] >test/test_integration.py::test_completion[usages:178] PASSED [ 9%] >test/test_integration.py::test_completion[usages:180] PASSED [ 9%] >test/test_integration.py::test_completion[usages:185] PASSED [ 9%] >test/test_integration.py::test_completion[usages:187] PASSED [ 9%] >test/test_integration.py::test_completion[usages:189] PASSED [ 9%] >test/test_integration.py::test_completion[usages:191] PASSED [ 9%] >test/test_integration.py::test_completion[usages:195] PASSED [ 9%] >test/test_integration.py::test_completion[usages:198] PASSED [ 9%] >test/test_integration.py::test_completion[usages:200] PASSED [ 9%] >test/test_integration.py::test_completion[usages:210] PASSED [ 9%] >test/test_integration.py::test_completion[usages:215] PASSED [ 9%] >test/test_integration.py::test_completion[usages:219] PASSED [ 9%] >test/test_integration.py::test_completion[usages:223] PASSED [ 10%] >test/test_integration.py::test_completion[usages:225] PASSED [ 10%] >test/test_integration.py::test_completion[usages:230] PASSED [ 10%] >test/test_integration.py::test_completion[usages:236] PASSED [ 10%] >test/test_integration.py::test_completion[usages:245] PASSED [ 10%] >test/test_integration.py::test_completion[usages:257] PASSED [ 10%] >test/test_integration.py::test_completion[usages:268] PASSED [ 10%] >test/test_integration.py::test_completion[usages:275] PASSED [ 10%] >test/test_integration.py::test_completion[usages:282] FAILED [ 10%] >test/test_integration.py::test_completion[usages:284] FAILED [ 10%] >test/test_integration.py::test_completion[usages:287] FAILED [ 10%] >test/test_integration.py::test_completion[usages:289] FAILED [ 10%] >test/test_integration.py::test_completion[usages:293] FAILED [ 10%] >test/test_integration.py::test_completion[usages:295] FAILED [ 10%] >test/test_integration.py::test_completion[usages:299] FAILED [ 10%] >test/test_integration.py::test_completion[usages:301] FAILED [ 10%] >test/test_integration.py::test_completion[usages:309] PASSED [ 10%] >test/test_integration.py::test_completion[usages:312] PASSED [ 11%] >test/test_integration.py::test_completion[basic:4] PASSED [ 11%] >test/test_integration.py::test_completion[basic:6] PASSED [ 11%] >test/test_integration.py::test_completion[basic:8] PASSED [ 11%] >test/test_integration.py::test_completion[basic:15] PASSED [ 11%] >test/test_integration.py::test_completion[basic:17] PASSED [ 11%] >test/test_integration.py::test_completion[basic:19] PASSED [ 11%] >test/test_integration.py::test_completion[basic:21] PASSED [ 11%] >test/test_integration.py::test_completion[basic:23] PASSED [ 11%] >test/test_integration.py::test_completion[basic:26] PASSED [ 11%] >test/test_integration.py::test_completion[basic:39] PASSED [ 11%] >test/test_integration.py::test_completion[basic:48] PASSED [ 11%] >test/test_integration.py::test_completion[basic:50] PASSED [ 11%] >test/test_integration.py::test_completion[basic:57] PASSED [ 11%] >test/test_integration.py::test_completion[basic:61] PASSED [ 11%] >test/test_integration.py::test_completion[basic:70] PASSED [ 11%] >test/test_integration.py::test_completion[basic:74] PASSED [ 11%] >test/test_integration.py::test_completion[basic:78] PASSED [ 12%] >test/test_integration.py::test_completion[basic:80] PASSED [ 12%] >test/test_integration.py::test_completion[basic:84] PASSED [ 12%] >test/test_integration.py::test_completion[basic:86] PASSED [ 12%] >test/test_integration.py::test_completion[basic:88] PASSED [ 12%] >test/test_integration.py::test_completion[basic:93] PASSED [ 12%] >test/test_integration.py::test_completion[basic:97] PASSED [ 12%] >test/test_integration.py::test_completion[basic:101] PASSED [ 12%] >test/test_integration.py::test_completion[basic:104] PASSED [ 12%] >test/test_integration.py::test_completion[basic:112] PASSED [ 12%] >test/test_integration.py::test_completion[basic:116] PASSED [ 12%] >test/test_integration.py::test_completion[basic:126] PASSED [ 12%] >test/test_integration.py::test_completion[basic:135] PASSED [ 12%] >test/test_integration.py::test_completion[basic:141] PASSED [ 12%] >test/test_integration.py::test_completion[basic:143] PASSED [ 12%] >test/test_integration.py::test_completion[basic:154] PASSED [ 12%] >test/test_integration.py::test_completion[basic:164] PASSED [ 12%] >test/test_integration.py::test_completion[basic:175] PASSED [ 13%] >test/test_integration.py::test_completion[basic:184] PASSED [ 13%] >test/test_integration.py::test_completion[basic:189] PASSED [ 13%] >test/test_integration.py::test_completion[basic:193] PASSED [ 13%] >test/test_integration.py::test_completion[basic:198] PASSED [ 13%] >test/test_integration.py::test_completion[basic:209] PASSED [ 13%] >test/test_integration.py::test_completion[basic:211] PASSED [ 13%] >test/test_integration.py::test_completion[basic:214] PASSED [ 13%] >test/test_integration.py::test_completion[basic:224] PASSED [ 13%] >test/test_integration.py::test_completion[basic:231] PASSED [ 13%] >test/test_integration.py::test_completion[basic:235] PASSED [ 13%] >test/test_integration.py::test_completion[basic:238] PASSED [ 13%] >test/test_integration.py::test_completion[basic:247] PASSED [ 13%] >test/test_integration.py::test_completion[basic:249] PASSED [ 13%] >test/test_integration.py::test_completion[basic:268] PASSED [ 13%] >test/test_integration.py::test_completion[basic:270] PASSED [ 13%] >test/test_integration.py::test_completion[basic:281] PASSED [ 13%] >test/test_integration.py::test_completion[basic:289] PASSED [ 14%] >test/test_integration.py::test_completion[basic:291] PASSED [ 14%] >test/test_integration.py::test_completion[basic:300] PASSED [ 14%] >test/test_integration.py::test_completion[basic:303] PASSED [ 14%] >test/test_integration.py::test_completion[basic:307] PASSED [ 14%] >test/test_integration.py::test_completion[basic:309] PASSED [ 14%] >test/test_integration.py::test_completion[definition:12] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:16] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:20] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:24] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:31] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:52] SKIPPED [ 14%] >test/test_integration.py::test_completion[definition:62] SKIPPED [ 14%] >test/test_integration.py::test_completion[goto:4] PASSED [ 14%] >test/test_integration.py::test_completion[goto:7] PASSED [ 14%] >test/test_integration.py::test_completion[goto:9] PASSED [ 14%] >test/test_integration.py::test_completion[goto:14] PASSED [ 14%] >test/test_integration.py::test_completion[goto:18] PASSED [ 14%] >test/test_integration.py::test_completion[goto:20] PASSED [ 15%] >test/test_integration.py::test_completion[goto:23] PASSED [ 15%] >test/test_integration.py::test_completion[goto:25] PASSED [ 15%] >test/test_integration.py::test_completion[goto:28] PASSED [ 15%] >test/test_integration.py::test_completion[goto:30] PASSED [ 15%] >test/test_integration.py::test_completion[goto:33] PASSED [ 15%] >test/test_integration.py::test_completion[goto:41] PASSED [ 15%] >test/test_integration.py::test_completion[goto:43] PASSED [ 15%] >test/test_integration.py::test_completion[goto:45] PASSED [ 15%] >test/test_integration.py::test_completion[goto:47] PASSED [ 15%] >test/test_integration.py::test_completion[goto:51] PASSED [ 15%] >test/test_integration.py::test_completion[goto:54] PASSED [ 15%] >test/test_integration.py::test_completion[goto:57] PASSED [ 15%] >test/test_integration.py::test_completion[goto:59] PASSED [ 15%] >test/test_integration.py::test_completion[goto:61] PASSED [ 15%] >test/test_integration.py::test_completion[goto:63] PASSED [ 15%] >test/test_integration.py::test_completion[goto:67] PASSED [ 15%] >test/test_integration.py::test_completion[goto:69] PASSED [ 16%] >test/test_integration.py::test_completion[goto:72] PASSED [ 16%] >test/test_integration.py::test_completion[goto:74] PASSED [ 16%] >test/test_integration.py::test_completion[goto:80] PASSED [ 16%] >test/test_integration.py::test_completion[goto:82] PASSED [ 16%] >test/test_integration.py::test_completion[goto:89] PASSED [ 16%] >test/test_integration.py::test_completion[goto:91] PASSED [ 16%] >test/test_integration.py::test_completion[goto:95] PASSED [ 16%] >test/test_integration.py::test_completion[goto:97] PASSED [ 16%] >test/test_integration.py::test_completion[goto:102] PASSED [ 16%] >test/test_integration.py::test_completion[goto:109] PASSED [ 16%] >test/test_integration.py::test_completion[goto:116] PASSED [ 16%] >test/test_integration.py::test_completion[goto:118] PASSED [ 16%] >test/test_integration.py::test_completion[goto:121] PASSED [ 16%] >test/test_integration.py::test_completion[goto:123] PASSED [ 16%] >test/test_integration.py::test_completion[goto:126] PASSED [ 16%] >test/test_integration.py::test_completion[goto:128] PASSED [ 16%] >test/test_integration.py::test_completion[goto:131] PASSED [ 17%] >test/test_integration.py::test_completion[goto:133] PASSED [ 17%] >test/test_integration.py::test_completion[goto:135] PASSED [ 17%] >test/test_integration.py::test_completion[goto:138] PASSED [ 17%] >test/test_integration.py::test_completion[goto:140] PASSED [ 17%] >test/test_integration.py::test_completion[goto:143] PASSED [ 17%] >test/test_integration.py::test_completion[goto:145] PASSED [ 17%] >test/test_integration.py::test_completion[goto:148] PASSED [ 17%] >test/test_integration.py::test_completion[goto:151] PASSED [ 17%] >test/test_integration.py::test_completion[goto:154] PASSED [ 17%] >test/test_integration.py::test_completion[goto:166] PASSED [ 17%] >test/test_integration.py::test_completion[goto:173] PASSED [ 17%] >test/test_integration.py::test_completion[goto:183] PASSED [ 17%] >test/test_integration.py::test_completion[goto:185] PASSED [ 17%] >test/test_integration.py::test_completion[goto:187] PASSED [ 17%] >test/test_integration.py::test_completion[goto:197] PASSED [ 17%] >test/test_integration.py::test_completion[goto:201] PASSED [ 17%] >test/test_integration.py::test_completion[goto:205] PASSED [ 18%] >test/test_integration.py::test_completion[goto:214] PASSED [ 18%] >test/test_integration.py::test_completion[goto:223] PASSED [ 18%] >test/test_integration.py::test_completion[goto:228] PASSED [ 18%] >test/test_integration.py::test_completion[types:5] PASSED [ 18%] >test/test_integration.py::test_completion[types:8] PASSED [ 18%] >test/test_integration.py::test_completion[types:11] PASSED [ 18%] >test/test_integration.py::test_completion[types:14] PASSED [ 18%] >test/test_integration.py::test_completion[types:17] PASSED [ 18%] >test/test_integration.py::test_completion[types:20] PASSED [ 18%] >test/test_integration.py::test_completion[types:24] PASSED [ 18%] >test/test_integration.py::test_completion[types:27] PASSED [ 18%] >test/test_integration.py::test_completion[types:35] PASSED [ 18%] >test/test_integration.py::test_completion[types:38] PASSED [ 18%] >test/test_integration.py::test_completion[types:40] PASSED [ 18%] >test/test_integration.py::test_completion[types:44] PASSED [ 18%] >test/test_integration.py::test_completion[types:47] PASSED [ 18%] >test/test_integration.py::test_completion[types:51] PASSED [ 19%] >test/test_integration.py::test_completion[types:54] PASSED [ 19%] >test/test_integration.py::test_completion[types:58] PASSED [ 19%] >test/test_integration.py::test_completion[types:66] PASSED [ 19%] >test/test_integration.py::test_completion[types:70] PASSED [ 19%] >test/test_integration.py::test_completion[types:72] PASSED [ 19%] >test/test_integration.py::test_completion[types:76] PASSED [ 19%] >test/test_integration.py::test_completion[types:79] PASSED [ 19%] >test/test_integration.py::test_completion[types:84] PASSED [ 19%] >test/test_integration.py::test_completion[types:89] PASSED [ 19%] >test/test_integration.py::test_completion[types:91] PASSED [ 19%] >test/test_integration.py::test_completion[types:95] FAILED [ 19%] >test/test_integration.py::test_completion[types:97] PASSED [ 19%] >test/test_integration.py::test_completion[types:105] PASSED [ 19%] >test/test_integration.py::test_completion[types:109] PASSED [ 19%] >test/test_integration.py::test_completion[types:111] PASSED [ 19%] >test/test_integration.py::test_completion[types:115] PASSED [ 19%] >test/test_integration.py::test_completion[types:119] PASSED [ 20%] >test/test_integration.py::test_completion[types:127] PASSED [ 20%] >test/test_integration.py::test_completion[types:132] PASSED [ 20%] >test/test_integration.py::test_completion[__init__:7] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:7] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:9] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:15] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:19] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:26] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:28] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:30] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:37] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:39] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:46] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:48] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:52] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:54] PASSED [ 20%] >test/test_integration.py::test_completion[ordering:58] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:60] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:67] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:69] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:73] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:75] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:81] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:89] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:105] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:114] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:123] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:128] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:131] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:135] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:143] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:147] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:149] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:151] PASSED [ 21%] >test/test_integration.py::test_completion[ordering:153] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:156] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:164] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:166] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:175] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:177] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:181] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:183] PASSED [ 22%] >test/test_integration.py::test_completion[ordering:194] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:11] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:18] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:21] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:27] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:30] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:34] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:48] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:50] PASSED [ 22%] >test/test_integration.py::test_completion[named_param:52] PASSED [ 23%] >test/test_integration.py::test_completion[named_param:54] PASSED [ 23%] >test/test_integration.py::test_completion[named_param:56] PASSED [ 23%] >test/test_integration.py::test_completion[named_param:61] PASSED [ 23%] >test/test_integration.py::test_completion[imports:9] PASSED [ 23%] >test/test_integration.py::test_completion[imports:12] PASSED [ 23%] >test/test_integration.py::test_completion[imports:15] PASSED [ 23%] >test/test_integration.py::test_completion[imports:19] PASSED [ 23%] >test/test_integration.py::test_completion[imports:26] PASSED [ 23%] >test/test_integration.py::test_completion[imports:29] PASSED [ 23%] >test/test_integration.py::test_completion[imports:32] PASSED [ 23%] >test/test_integration.py::test_completion[imports:38] PASSED [ 23%] >test/test_integration.py::test_completion[imports:41] PASSED [ 23%] >test/test_integration.py::test_completion[imports:44] PASSED [ 23%] >test/test_integration.py::test_completion[imports:47] PASSED [ 23%] >test/test_integration.py::test_completion[imports:50] PASSED [ 23%] >test/test_integration.py::test_completion[imports:52] PASSED [ 23%] >test/test_integration.py::test_completion[imports:56] PASSED [ 24%] >test/test_integration.py::test_completion[imports:63] PASSED [ 24%] >test/test_integration.py::test_completion[imports:65] PASSED [ 24%] >test/test_integration.py::test_completion[imports:71] PASSED [ 24%] >test/test_integration.py::test_completion[imports:81] PASSED [ 24%] >test/test_integration.py::test_completion[imports:83] PASSED [ 24%] >test/test_integration.py::test_completion[imports:86] PASSED [ 24%] >test/test_integration.py::test_completion[imports:88] PASSED [ 24%] >test/test_integration.py::test_completion[imports:96] PASSED [ 24%] >test/test_integration.py::test_completion[imports:98] PASSED [ 24%] >test/test_integration.py::test_completion[imports:101] PASSED [ 24%] >test/test_integration.py::test_completion[imports:107] PASSED [ 24%] >test/test_integration.py::test_completion[imports:110] PASSED [ 24%] >test/test_integration.py::test_completion[imports:113] PASSED [ 24%] >test/test_integration.py::test_completion[imports:125] PASSED [ 24%] >test/test_integration.py::test_completion[imports:130] PASSED [ 24%] >test/test_integration.py::test_completion[imports:133] PASSED [ 24%] >test/test_integration.py::test_completion[imports:141] PASSED [ 25%] >test/test_integration.py::test_completion[imports:146] PASSED [ 25%] >test/test_integration.py::test_completion[imports:150] PASSED [ 25%] >test/test_integration.py::test_completion[imports:157] PASSED [ 25%] >test/test_integration.py::test_completion[imports:162] PASSED [ 25%] >test/test_integration.py::test_completion[imports:166] PASSED [ 25%] >test/test_integration.py::test_completion[imports:171] PASSED [ 25%] >test/test_integration.py::test_completion[imports:174] PASSED [ 25%] >test/test_integration.py::test_completion[imports:185] PASSED [ 25%] >test/test_integration.py::test_completion[imports:188] PASSED [ 25%] >test/test_integration.py::test_completion[imports:192] PASSED [ 25%] >test/test_integration.py::test_completion[imports:199] PASSED [ 25%] >test/test_integration.py::test_completion[imports:207] PASSED [ 25%] >test/test_integration.py::test_completion[imports:211] PASSED [ 25%] >test/test_integration.py::test_completion[imports:215] PASSED [ 25%] >test/test_integration.py::test_completion[imports:219] PASSED [ 25%] >test/test_integration.py::test_completion[imports:223] PASSED [ 25%] >test/test_integration.py::test_completion[imports:227] PASSED [ 26%] >test/test_integration.py::test_completion[imports:231] PASSED [ 26%] >test/test_integration.py::test_completion[imports:235] PASSED [ 26%] >test/test_integration.py::test_completion[imports:247] PASSED [ 26%] >test/test_integration.py::test_completion[imports:252] PASSED [ 26%] >test/test_integration.py::test_completion[imports:255] PASSED [ 26%] >test/test_integration.py::test_completion[imports:269] PASSED [ 26%] >test/test_integration.py::test_completion[imports:278] PASSED [ 26%] >test/test_integration.py::test_completion[imports:280] PASSED [ 26%] >test/test_integration.py::test_completion[imports:284] PASSED [ 26%] >test/test_integration.py::test_completion[imports:292] PASSED [ 26%] >test/test_integration.py::test_completion[imports:294] PASSED [ 26%] >test/test_integration.py::test_completion[completion:13] PASSED [ 26%] >test/test_integration.py::test_completion[completion:23] PASSED [ 26%] >test/test_integration.py::test_completion[completion:31] PASSED [ 26%] >test/test_integration.py::test_completion[completion:36] PASSED [ 26%] >test/test_integration.py::test_completion[completion:41] PASSED [ 26%] >test/test_integration.py::test_completion[completion:44] PASSED [ 27%] >test/test_integration.py::test_completion[completion:49] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:17] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:19] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:21] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:23] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:25] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:27] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:36] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:47] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:54] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:61] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:71] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:81] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:86] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:89] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:96] PASSED [ 27%] >test/test_integration.py::test_completion[pep0484_basic:103] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:105] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:107] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:109] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:112] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:122] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:125] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:128] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:131] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:133] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:135] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:141] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:143] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:152] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:154] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:159] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:164] PASSED [ 28%] >test/test_integration.py::test_completion[pep0484_basic:166] PASSED [ 28%] >test/test_integration.py::test_completion[stdlib:10] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:13] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:21] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:25] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:28] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:31] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:35] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:41] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:43] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:45] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:47] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:49] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:55] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:57] FAILED [ 29%] >test/test_integration.py::test_completion[stdlib:62] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:65] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:69] PASSED [ 29%] >test/test_integration.py::test_completion[stdlib:75] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:81] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:83] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:92] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:94] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:97] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:101] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:104] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:112] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:115] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:117] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:126] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:133] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:135] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:140] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:142] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:155] PASSED [ 30%] >test/test_integration.py::test_completion[stdlib:164] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:166] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:168] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:170] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:178] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:187] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:195] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:198] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:207] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:209] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:222] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:241] PASSED [ 31%] >test/test_integration.py::test_completion[stdlib:252] PASSED [ 31%] >test/test_integration.py::test_completion[pep0484_typing:19] PASSED [ 31%] >test/test_integration.py::test_completion[pep0484_typing:21] PASSED [ 31%] >test/test_integration.py::test_completion[pep0484_typing:23] PASSED [ 31%] >test/test_integration.py::test_completion[pep0484_typing:25] PASSED [ 31%] >test/test_integration.py::test_completion[pep0484_typing:27] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:29] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:31] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:33] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:35] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:37] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:39] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:41] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:43] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:54] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:56] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:59] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:65] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:69] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:71] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:74] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:76] PASSED [ 32%] >test/test_integration.py::test_completion[pep0484_typing:79] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:87] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:89] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:98] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:100] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:102] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:104] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:106] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:108] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:110] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:112] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:115] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:119] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:123] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:142] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:144] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:146] PASSED [ 33%] >test/test_integration.py::test_completion[pep0484_typing:148] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:150] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:153] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:156] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:159] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:162] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:164] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:167] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:169] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:172] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:174] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:177] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:180] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:183] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:185] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:196] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:198] PASSED [ 34%] >test/test_integration.py::test_completion[pep0484_typing:200] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:202] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:204] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:214] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:228] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:231] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:234] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:238] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:241] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:244] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:256] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:259] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:262] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:266] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:269] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:272] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:283] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:288] PASSED [ 35%] >test/test_integration.py::test_completion[pep0484_typing:293] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:16] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:18] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:20] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:22] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:24] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:26] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:29] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:46] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:48] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:50] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:52] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:54] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:57] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:67] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:81] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:83] PASSED [ 36%] >test/test_integration.py::test_completion[docstring:96] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:101] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:109] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:119] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:134] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:136] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:139] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:142] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:153] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:164] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:166] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:168] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:179] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:189] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:197] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:209] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:218] PASSED [ 37%] >test/test_integration.py::test_completion[docstring:230] PASSED [ 38%] >test/test_integration.py::test_completion[docstring:238] PASSED [ 38%] >test/test_integration.py::test_completion[docstring:253] PASSED [ 38%] >test/test_integration.py::test_completion[sys_path:13] PASSED [ 38%] >test/test_integration.py::test_completion[sys_path:16] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:16] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:19] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:34] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:36] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:38] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:40] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:42] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:48] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:66] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:68] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:70] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:72] PASSED [ 38%] >test/test_integration.py::test_completion[decorators:74] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:95] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:97] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:106] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:119] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:121] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:123] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:147] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:149] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:159] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:162] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:171] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:173] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:175] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:177] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:197] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:199] PASSED [ 39%] >test/test_integration.py::test_completion[decorators:209] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:211] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:222] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:251] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:253] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:255] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:273] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:275] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:277] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:279] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:303] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:316] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:325] PASSED [ 40%] >test/test_integration.py::test_completion[decorators:328] PASSED [ 40%] >test/test_integration.py::test_completion[context:14] PASSED [ 40%] >test/test_integration.py::test_completion[context:16] PASSED [ 40%] >test/test_integration.py::test_completion[context:19] PASSED [ 40%] >test/test_integration.py::test_completion[context:22] PASSED [ 41%] >test/test_integration.py::test_completion[context:25] PASSED [ 41%] >test/test_integration.py::test_completion[context:28] PASSED [ 41%] >test/test_integration.py::test_completion[context:31] PASSED [ 41%] >test/test_integration.py::test_completion[context:44] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:6] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:8] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:10] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:12] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:14] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:18] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:21] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:25] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:30] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:33] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:39] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:42] PASSED [ 41%] >test/test_integration.py::test_completion[arrays:45] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:48] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:56] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:64] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:71] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:73] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:77] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:79] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:84] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:86] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:90] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:92] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:99] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:103] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:105] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:107] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:115] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:117] PASSED [ 42%] >test/test_integration.py::test_completion[arrays:121] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:123] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:125] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:127] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:129] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:137] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:139] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:141] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:143] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:147] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:151] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:153] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:157] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:161] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:163] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:165] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:167] PASSED [ 43%] >test/test_integration.py::test_completion[arrays:174] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:181] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:183] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:187] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:189] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:191] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:195] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:197] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:201] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:203] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:210] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:213] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:217] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:219] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:221] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:223] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:228] PASSED [ 44%] >test/test_integration.py::test_completion[arrays:231] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:233] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:243] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:247] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:254] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:259] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:264] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:267] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:271] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:273] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:275] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:283] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:288] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:291] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:298] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:309] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:319] PASSED [ 45%] >test/test_integration.py::test_completion[arrays:326] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:330] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:339] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:341] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:349] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:352] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:354] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:357] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:359] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:361] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:365] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:367] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:371] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:373] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:377] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:379] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:383] PASSED [ 46%] >test/test_integration.py::test_completion[arrays:385] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:388] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:392] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:397] FAILED [ 47%] >test/test_integration.py::test_completion[arrays:406] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:418] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:428] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:433] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:437] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:446] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:448] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:450] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:455] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:457] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:459] PASSED [ 47%] >test/test_integration.py::test_completion[arrays:464] PASSED [ 47%] >test/test_integration.py::test_completion[generators:11] PASSED [ 47%] >test/test_integration.py::test_completion[generators:14] PASSED [ 48%] >test/test_integration.py::test_completion[generators:21] PASSED [ 48%] >test/test_integration.py::test_completion[generators:24] PASSED [ 48%] >test/test_integration.py::test_completion[generators:31] PASSED [ 48%] >test/test_integration.py::test_completion[generators:44] PASSED [ 48%] >test/test_integration.py::test_completion[generators:51] PASSED [ 48%] >test/test_integration.py::test_completion[generators:64] PASSED [ 48%] >test/test_integration.py::test_completion[generators:68] PASSED [ 48%] >test/test_integration.py::test_completion[generators:70] PASSED [ 48%] >test/test_integration.py::test_completion[generators:74] PASSED [ 48%] >test/test_integration.py::test_completion[generators:78] PASSED [ 48%] >test/test_integration.py::test_completion[generators:106] PASSED [ 48%] >test/test_integration.py::test_completion[generators:121] PASSED [ 48%] >test/test_integration.py::test_completion[generators:123] PASSED [ 48%] >test/test_integration.py::test_completion[generators:134] PASSED [ 48%] >test/test_integration.py::test_completion[generators:137] PASSED [ 48%] >test/test_integration.py::test_completion[generators:146] PASSED [ 48%] >test/test_integration.py::test_completion[generators:148] PASSED [ 49%] >test/test_integration.py::test_completion[generators:152] FAILED [ 49%] >test/test_integration.py::test_completion[generators:160] PASSED [ 49%] >test/test_integration.py::test_completion[generators:163] PASSED [ 49%] >test/test_integration.py::test_completion[generators:166] PASSED [ 49%] >test/test_integration.py::test_completion[generators:169] PASSED [ 49%] >test/test_integration.py::test_completion[generators:173] PASSED [ 49%] >test/test_integration.py::test_completion[generators:176] PASSED [ 49%] >test/test_integration.py::test_completion[generators:179] PASSED [ 49%] >test/test_integration.py::test_completion[generators:189] PASSED [ 49%] >test/test_integration.py::test_completion[generators:191] PASSED [ 49%] >test/test_integration.py::test_completion[generators:198] PASSED [ 49%] >test/test_integration.py::test_completion[generators:208] PASSED [ 49%] >test/test_integration.py::test_completion[generators:216] PASSED [ 49%] >test/test_integration.py::test_completion[generators:228] PASSED [ 49%] >test/test_integration.py::test_completion[generators:237] PASSED [ 49%] >test/test_integration.py::test_completion[generators:239] PASSED [ 49%] >test/test_integration.py::test_completion[generators:244] PASSED [ 50%] >test/test_integration.py::test_completion[generators:249] PASSED [ 50%] >test/test_integration.py::test_completion[generators:251] PASSED [ 50%] >test/test_integration.py::test_completion[generators:254] PASSED [ 50%] >test/test_integration.py::test_completion[generators:260] PASSED [ 50%] >test/test_integration.py::test_completion[generators:265] PASSED [ 50%] >test/test_integration.py::test_completion[generators:268] PASSED [ 50%] >test/test_integration.py::test_completion[generators:271] PASSED [ 50%] >test/test_integration.py::test_completion[comprehensions:8] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:10] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:14] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:20] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:24] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:28] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:33] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:35] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:37] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:41] FAILED [ 50%] >test/test_integration.py::test_completion[comprehensions:47] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:51] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:57] PASSED [ 51%] >test/test_integration.py::test_completion[comprehensions:61] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:69] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:71] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:75] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:77] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:81] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:85] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:88] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:92] PASSED [ 51%] >test/test_integration.py::test_completion[comprehensions:94] PASSED [ 51%] >test/test_integration.py::test_completion[comprehensions:96] PASSED [ 51%] >test/test_integration.py::test_completion[comprehensions:105] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:107] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:112] FAILED [ 51%] >test/test_integration.py::test_completion[comprehensions:114] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:118] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:121] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:127] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:129] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:138] PASSED [ 52%] >test/test_integration.py::test_completion[comprehensions:146] PASSED [ 52%] >test/test_integration.py::test_completion[comprehensions:148] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:150] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:163] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:167] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:176] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:180] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:182] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:184] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:186] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:188] FAILED [ 52%] >test/test_integration.py::test_completion[comprehensions:195] PASSED [ 53%] >test/test_integration.py::test_completion[comprehensions:198] PASSED [ 53%] >test/test_integration.py::test_completion[comprehensions:201] FAILED [ 53%] >test/test_integration.py::test_completion[comprehensions:204] FAILED [ 53%] >test/test_integration.py::test_completion[comprehensions:206] FAILED [ 53%] >test/test_integration.py::test_completion[comprehensions:209] FAILED [ 53%] >test/test_integration.py::test_completion[comprehensions:213] FAILED [ 53%] >test/test_integration.py::test_completion[parser:23] PASSED [ 53%] >test/test_integration.py::test_completion[parser:26] PASSED [ 53%] >test/test_integration.py::test_completion[parser:35] PASSED [ 53%] >test/test_integration.py::test_completion[parser:42] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:23] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:25] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:29] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:32] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:34] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:38] PASSED [ 53%] >test/test_integration.py::test_completion[descriptors:40] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:42] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:45] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:47] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:64] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:66] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:69] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:71] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:109] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:111] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:114] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:116] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:119] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:121] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:124] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:126] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:129] PASSED [ 54%] >test/test_integration.py::test_completion[descriptors:143] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:163] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:165] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:167] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:169] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:172] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:174] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:176] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:178] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:181] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:183] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:217] PASSED [ 55%] >test/test_integration.py::test_completion[descriptors:220] PASSED [ 55%] >test/test_integration.py::test_completion[flow_analysis:8] PASSED [ 55%] >test/test_integration.py::test_completion[flow_analysis:12] PASSED [ 55%] >test/test_integration.py::test_completion[flow_analysis:18] PASSED [ 55%] >test/test_integration.py::test_completion[flow_analysis:20] PASSED [ 55%] >test/test_integration.py::test_completion[flow_analysis:24] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:28] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:34] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:47] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:61] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:75] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:91] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:106] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:121] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:133] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:135] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:144] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:148] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:152] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:158] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:162] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:183] PASSED [ 56%] >test/test_integration.py::test_completion[flow_analysis:191] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:211] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:213] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:215] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:217] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:219] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:221] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:223] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:234] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:236] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:240] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:242] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:244] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:246] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:251] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:264] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:284] PASSED [ 57%] >test/test_integration.py::test_completion[flow_analysis:301] PASSED [ 57%] >test/test_integration.py::test_completion[functions:4] PASSED [ 58%] >test/test_integration.py::test_completion[functions:8] PASSED [ 58%] >test/test_integration.py::test_completion[functions:12] PASSED [ 58%] >test/test_integration.py::test_completion[functions:14] PASSED [ 58%] >test/test_integration.py::test_completion[functions:17] PASSED [ 58%] >test/test_integration.py::test_completion[functions:20] PASSED [ 58%] >test/test_integration.py::test_completion[functions:23] PASSED [ 58%] >test/test_integration.py::test_completion[functions:30] PASSED [ 58%] >test/test_integration.py::test_completion[functions:37] PASSED [ 58%] >test/test_integration.py::test_completion[functions:44] PASSED [ 58%] >test/test_integration.py::test_completion[functions:52] PASSED [ 58%] >test/test_integration.py::test_completion[functions:60] PASSED [ 58%] >test/test_integration.py::test_completion[functions:70] PASSED [ 58%] >test/test_integration.py::test_completion[functions:79] PASSED [ 58%] >test/test_integration.py::test_completion[functions:83] PASSED [ 58%] >test/test_integration.py::test_completion[functions:85] PASSED [ 58%] >test/test_integration.py::test_completion[functions:98] PASSED [ 58%] >test/test_integration.py::test_completion[functions:113] PASSED [ 59%] >test/test_integration.py::test_completion[functions:121] PASSED [ 59%] >test/test_integration.py::test_completion[functions:128] PASSED [ 59%] >test/test_integration.py::test_completion[functions:139] PASSED [ 59%] >test/test_integration.py::test_completion[functions:142] PASSED [ 59%] >test/test_integration.py::test_completion[functions:149] PASSED [ 59%] >test/test_integration.py::test_completion[functions:151] PASSED [ 59%] >test/test_integration.py::test_completion[functions:153] PASSED [ 59%] >test/test_integration.py::test_completion[functions:155] PASSED [ 59%] >test/test_integration.py::test_completion[functions:159] PASSED [ 59%] >test/test_integration.py::test_completion[functions:161] PASSED [ 59%] >test/test_integration.py::test_completion[functions:163] PASSED [ 59%] >test/test_integration.py::test_completion[functions:165] PASSED [ 59%] >test/test_integration.py::test_completion[functions:167] PASSED [ 59%] >test/test_integration.py::test_completion[functions:169] PASSED [ 59%] >test/test_integration.py::test_completion[functions:180] PASSED [ 59%] >test/test_integration.py::test_completion[functions:182] PASSED [ 59%] >test/test_integration.py::test_completion[functions:184] PASSED [ 60%] >test/test_integration.py::test_completion[functions:189] PASSED [ 60%] >test/test_integration.py::test_completion[functions:192] PASSED [ 60%] >test/test_integration.py::test_completion[functions:198] PASSED [ 60%] >test/test_integration.py::test_completion[functions:201] PASSED [ 60%] >test/test_integration.py::test_completion[functions:205] PASSED [ 60%] >test/test_integration.py::test_completion[functions:215] PASSED [ 60%] >test/test_integration.py::test_completion[functions:217] PASSED [ 60%] >test/test_integration.py::test_completion[functions:219] PASSED [ 60%] >test/test_integration.py::test_completion[functions:227] PASSED [ 60%] >test/test_integration.py::test_completion[functions:231] PASSED [ 60%] >test/test_integration.py::test_completion[functions:233] PASSED [ 60%] >test/test_integration.py::test_completion[functions:237] PASSED [ 60%] >test/test_integration.py::test_completion[functions:240] PASSED [ 60%] >test/test_integration.py::test_completion[functions:245] PASSED [ 60%] >test/test_integration.py::test_completion[functions:247] PASSED [ 60%] >test/test_integration.py::test_completion[functions:253] PASSED [ 60%] >test/test_integration.py::test_completion[functions:258] PASSED [ 61%] >test/test_integration.py::test_completion[functions:265] PASSED [ 61%] >test/test_integration.py::test_completion[functions:267] PASSED [ 61%] >test/test_integration.py::test_completion[functions:269] PASSED [ 61%] >test/test_integration.py::test_completion[functions:275] PASSED [ 61%] >test/test_integration.py::test_completion[functions:296] PASSED [ 61%] >test/test_integration.py::test_completion[functions:304] PASSED [ 61%] >test/test_integration.py::test_completion[functions:306] PASSED [ 61%] >test/test_integration.py::test_completion[functions:310] PASSED [ 61%] >test/test_integration.py::test_completion[functions:312] PASSED [ 61%] >test/test_integration.py::test_completion[functions:314] PASSED [ 61%] >test/test_integration.py::test_completion[functions:316] PASSED [ 61%] >test/test_integration.py::test_completion[functions:322] PASSED [ 61%] >test/test_integration.py::test_completion[functions:324] PASSED [ 61%] >test/test_integration.py::test_completion[functions:326] PASSED [ 61%] >test/test_integration.py::test_completion[functions:334] PASSED [ 61%] >test/test_integration.py::test_completion[functions:336] PASSED [ 61%] >test/test_integration.py::test_completion[functions:344] PASSED [ 62%] >test/test_integration.py::test_completion[functions:346] PASSED [ 62%] >test/test_integration.py::test_completion[functions:348] PASSED [ 62%] >test/test_integration.py::test_completion[functions:350] PASSED [ 62%] >test/test_integration.py::test_completion[functions:352] PASSED [ 62%] >test/test_integration.py::test_completion[functions:354] PASSED [ 62%] >test/test_integration.py::test_completion[functions:362] PASSED [ 62%] >test/test_integration.py::test_completion[functions:378] PASSED [ 62%] >test/test_integration.py::test_completion[functions:380] PASSED [ 62%] >test/test_integration.py::test_completion[functions:383] PASSED [ 62%] >test/test_integration.py::test_completion[functions:385] PASSED [ 62%] >test/test_integration.py::test_completion[functions:398] PASSED [ 62%] >test/test_integration.py::test_completion[functions:400] PASSED [ 62%] >test/test_integration.py::test_completion[functions:403] PASSED [ 62%] >test/test_integration.py::test_completion[functions:405] PASSED [ 62%] >test/test_integration.py::test_completion[functions:407] PASSED [ 62%] >test/test_integration.py::test_completion[functions:409] PASSED [ 62%] >test/test_integration.py::test_completion[functions:411] PASSED [ 63%] >test/test_integration.py::test_completion[functions:414] PASSED [ 63%] >test/test_integration.py::test_completion[functions:416] PASSED [ 63%] >test/test_integration.py::test_completion[functions:418] PASSED [ 63%] >test/test_integration.py::test_completion[functions:420] PASSED [ 63%] >test/test_integration.py::test_completion[functions:422] PASSED [ 63%] >test/test_integration.py::test_completion[functions:424] PASSED [ 63%] >test/test_integration.py::test_completion[functions:437] PASSED [ 63%] >test/test_integration.py::test_completion[functions:439] PASSED [ 63%] >test/test_integration.py::test_completion[functions:442] PASSED [ 63%] >test/test_integration.py::test_completion[functions:445] PASSED [ 63%] >test/test_integration.py::test_completion[functions:447] PASSED [ 63%] >test/test_integration.py::test_completion[functions:449] PASSED [ 63%] >test/test_integration.py::test_completion[functions:464] PASSED [ 63%] >test/test_integration.py::test_completion[functions:466] PASSED [ 63%] >test/test_integration.py::test_completion[functions:468] PASSED [ 63%] >test/test_integration.py::test_completion[functions:470] PASSED [ 63%] >test/test_integration.py::test_completion[functions:472] PASSED [ 64%] >test/test_integration.py::test_completion[functions:474] PASSED [ 64%] >test/test_integration.py::test_completion[functions:476] PASSED [ 64%] >test/test_integration.py::test_completion[functions:483] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:6] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:8] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:11] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:20] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:27] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:31] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:39] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:41] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:55] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:58] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:63] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:77] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:79] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:95] PASSED [ 64%] >test/test_integration.py::test_completion[dynamic_params:102] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:107] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:112] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:116] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:118] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:130] FAILED [ 65%] >test/test_integration.py::test_completion[dynamic_params:140] PASSED [ 65%] >test/test_integration.py::test_completion[dynamic_params:146] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:6] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:8] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:10] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:12] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:14] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:16] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:18] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:21] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:23] PASSED [ 65%] >test/test_integration.py::test_completion[fstring:26] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:13] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:22] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:40] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:44] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:48] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:55] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:63] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:69] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:76] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:80] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:90] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:94] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:100] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:104] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:111] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:117] PASSED [ 66%] >test/test_integration.py::test_completion[invalid:119] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:128] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:132] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:136] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:140] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:146] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:151] FAILED [ 67%] >test/test_integration.py::test_completion[invalid:154] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:161] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:167] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:179] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:183] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:188] PASSED [ 67%] >test/test_integration.py::test_completion[invalid:213] PASSED [ 67%] >test/test_integration.py::test_completion[lambdas:5] PASSED [ 67%] >test/test_integration.py::test_completion[lambdas:10] PASSED [ 67%] >test/test_integration.py::test_completion[lambdas:13] PASSED [ 67%] >test/test_integration.py::test_completion[lambdas:17] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:19] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:25] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:27] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:29] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:35] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:37] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:39] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:41] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:43] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:47] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:49] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:54] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:70] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:73] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:77] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:80] PASSED [ 68%] >test/test_integration.py::test_completion[lambdas:82] PASSED [ 69%] >test/test_integration.py::test_completion[lambdas:92] PASSED [ 69%] >test/test_integration.py::test_completion[lambdas:101] PASSED [ 69%] >test/test_integration.py::test_completion[lambdas:103] PASSED [ 69%] >test/test_integration.py::test_completion[lambdas:112] FAILED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:14] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:21] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:23] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:28] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:41] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:45] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:48] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:60] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:66] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:75] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:81] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:90] PASSED [ 69%] >test/test_integration.py::test_completion[dynamic_arrays:101] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:105] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:109] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:150] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:153] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:162] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:166] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:175] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:183] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:193] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:205] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:220] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:227] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:234] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:238] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:240] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:243] PASSED [ 70%] >test/test_integration.py::test_completion[dynamic_arrays:245] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:248] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:250] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:261] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:275] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:284] PASSED [ 71%] >test/test_integration.py::test_completion[dynamic_arrays:306] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:2] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:4] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:9] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:13] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:20] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:23] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:26] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:28] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:32] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:34] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:37] PASSED [ 71%] >test/test_integration.py::test_completion[on_import:40] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:42] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:44] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:46] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:50] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:58] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:61] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:63] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:66] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:68] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:70] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:72] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:74] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:77] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:80] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:82] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:84] PASSED [ 72%] >test/test_integration.py::test_completion[on_import:86] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:88] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:91] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:94] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:100] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:102] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:106] PASSED [ 73%] >test/test_integration.py::test_completion[on_import:108] PASSED [ 73%] >test/test_integration.py::test_completion[complex:13] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:2] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:5] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:8] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:11] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:14] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:17] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:20] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:23] PASSED [ 73%] >test/test_integration.py::test_completion[keywords:26] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:33] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:35] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:37] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:40] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:45] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:47] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:49] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:51] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:54] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:56] PASSED [ 74%] >test/test_integration.py::test_completion[keywords:58] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:2] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:6] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:10] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:15] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:20] PASSED [ 74%] >test/test_integration.py::test_completion[pep0484_comments:32] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:34] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:36] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:38] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:42] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:44] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:52] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:55] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:59] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:67] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:72] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:76] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:78] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:84] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:86] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:93] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:99] PASSED [ 75%] >test/test_integration.py::test_completion[pep0484_comments:104] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:111] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:115] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:118] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:134] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:139] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:143] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:151] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:157] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:168] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:175] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:179] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:183] PASSED [ 76%] >test/test_integration.py::test_completion[pep0484_comments:185] PASSED [ 76%] >test/test_integration.py::test_completion[async_:13] PASSED [ 76%] >test/test_integration.py::test_completion[async_:16] PASSED [ 76%] >test/test_integration.py::test_completion[async_:20] PASSED [ 76%] >test/test_integration.py::test_completion[async_:25] PASSED [ 77%] >test/test_integration.py::test_completion[async_:27] PASSED [ 77%] >test/test_integration.py::test_completion[async_:33] PASSED [ 77%] >test/test_integration.py::test_completion[async_:41] PASSED [ 77%] >test/test_integration.py::test_completion[async_:44] PASSED [ 77%] >test/test_integration.py::test_completion[async_:54] PASSED [ 77%] >test/test_integration.py::test_completion[async_:65] FAILED [ 77%] >test/test_integration.py::test_completion[async_:69] PASSED [ 77%] >test/test_integration.py::test_completion[async_:72] PASSED [ 77%] >test/test_integration.py::test_completion[async_:74] PASSED [ 77%] >test/test_integration.py::test_completion[async_:83] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:10] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:13] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:18] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:21] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:29] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:41] PASSED [ 77%] >test/test_integration.py::test_completion[precedence:45] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:48] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:52] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:55] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:57] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:69] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:76] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:89] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:104] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:112] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:128] PASSED [ 78%] >test/test_integration.py::test_completion[precedence:137] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:10] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:13] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:27] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:38] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:50] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:70] PASSED [ 78%] >test/test_integration.py::test_completion[recursion:72] PASSED [ 79%] >test/test_integration.py::test_completion[recursion:75] PASSED [ 79%] >test/test_integration.py::test_completion[recursion:77] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:12] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:17] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:21] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:27] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:31] PASSED [ 79%] >test/test_integration.py::test_completion[pep0526_variables:37] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:2] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:6] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:10] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:14] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:18] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:22] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:29] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:37] PASSED [ 79%] >test/test_integration.py::test_completion[isinstance:49] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:62] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:70] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:74] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:91] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:93] PASSED [ 80%] >test/test_integration.py::test_completion[isinstance:100] PASSED [ 80%] >test/test_integration.py::test_static_analysis[builtins.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[attribute_error.py] FAILED [ 80%] >test/test_integration.py::test_static_analysis[attribute_warnings.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[imports.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[class_simple.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[normal_arguments.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[operations.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[generators.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[comprehensions.py] FAILED [ 80%] >test/test_integration.py::test_static_analysis[descriptors.py] PASSED [ 80%] >test/test_integration.py::test_static_analysis[try_except.py] PASSED [ 81%] >test/test_integration.py::test_static_analysis[branches.py] PASSED [ 81%] >test/test_integration.py::test_static_analysis[keywords.py] PASSED [ 81%] >test/test_integration.py::test_static_analysis[iterable.py] PASSED [ 81%] >test/test_integration.py::test_static_analysis[star_arguments.py] PASSED [ 81%] >test/test_integration.py::test_static_analysis[python2.py] SKIPPED [ 81%] >test/test_integration.py::test_refactor[refactor_case0] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case1] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case2] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case3] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case4] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case5] PASSED [ 81%] >test/test_integration.py::test_refactor[refactor_case6] PASSED [ 81%] >test/test_utils.py::TestSetupReadline::test_calls PASSED [ 81%] >test/test_utils.py::TestSetupReadline::test_colorama PASSED [ 81%] >test/test_utils.py::TestSetupReadline::test_import PASSED [ 81%] >test/test_utils.py::TestSetupReadline::test_local_import <- test/helpers.py PASSED [ 81%] >test/test_utils.py::TestSetupReadline::test_magic_methods PASSED [ 82%] >test/test_utils.py::TestSetupReadline::test_modules PASSED [ 82%] >test/test_utils.py::TestSetupReadline::test_nested PASSED [ 82%] >test/test_utils.py::TestSetupReadline::test_preexisting_values PASSED [ 82%] >test/test_utils.py::TestSetupReadline::test_simple PASSED [ 82%] >test/test_utils.py::test_version_info PASSED [ 82%] >test/test_api/test_analysis.py::test_issue436 PASSED [ 82%] >test/test_api/test_api.py::test_preload_modules PASSED [ 82%] >test/test_api/test_api.py::test_empty_script PASSED [ 82%] >test/test_api/test_api.py::test_line_number_errors PASSED [ 82%] >test/test_api/test_api.py::test_completion_on_number_literals PASSED [ 82%] >test/test_api/test_api.py::test_completion_on_hex_literals PASSED [ 82%] >test/test_api/test_api.py::test_completion_on_complex_literals PASSED [ 82%] >test/test_api/test_api.py::test_goto_assignments_on_non_name PASSED [ 82%] >test/test_api/test_api.py::test_goto_definitions_on_non_name PASSED [ 82%] >test/test_api/test_api.py::test_goto_definitions_on_generator PASSED [ 82%] >test/test_api/test_api.py::test_goto_definition_not_multiple PASSED [ 82%] >test/test_api/test_api.py::test_usage_description PASSED [ 83%] >test/test_api/test_api.py::test_get_line_code PASSED [ 83%] >test/test_api/test_api.py::test_goto_assignments_follow_imports PASSED [ 83%] >test/test_api/test_api.py::test_goto_module PASSED [ 83%] >test/test_api/test_api.py::test_goto_definition_cursor PASSED [ 83%] >test/test_api/test_api.py::test_no_statement_parent PASSED [ 83%] >test/test_api/test_api.py::test_backslash_continuation_and_bracket PASSED [ 83%] >test/test_api/test_api_classes_follow_definition.py::test_follow_definition_nested_import <- test/helpers.py PASSED [ 83%] >test/test_api/test_api_classes_follow_definition.py::test_import_empty PASSED [ 83%] >test/test_api/test_api_classes_follow_definition.py::test_follow_import_incomplete PASSED [ 83%] >test/test_api/test_api_classes_follow_definition.py::test_follow_definition_land_on_import PASSED [ 83%] >test/test_api/test_call_signatures.py::test_valid_call PASSED [ 83%] >test/test_api/test_call_signatures.py::TestCallSignatures::test_flows PASSED [ 83%] >test/test_api/test_call_signatures.py::TestCallSignatures::test_issue_57 PASSED [ 83%] >test/test_api/test_call_signatures.py::TestCallSignatures::test_more_complicated PASSED [ 83%] >test/test_api/test_call_signatures.py::TestCallSignatures::test_simple PASSED [ 83%] >test/test_api/test_call_signatures.py::test_call_signatures_empty_parentheses_pre_space PASSED [ 83%] >test/test_api/test_call_signatures.py::test_multiple_signatures PASSED [ 84%] >test/test_api/test_call_signatures.py::test_call_signatures_whitespace PASSED [ 84%] >test/test_api/test_call_signatures.py::test_decorator_in_class PASSED [ 84%] >test/test_api/test_call_signatures.py::test_additional_brackets PASSED [ 84%] >test/test_api/test_call_signatures.py::test_unterminated_strings PASSED [ 84%] >test/test_api/test_call_signatures.py::test_whitespace_before_bracket PASSED [ 84%] >test/test_api/test_call_signatures.py::test_brackets_in_string_literals PASSED [ 84%] >test/test_api/test_call_signatures.py::test_function_definitions_should_break PASSED [ 84%] >test/test_api/test_call_signatures.py::test_flow_call PASSED [ 84%] >test/test_api/test_call_signatures.py::test_chained_calls PASSED [ 84%] >test/test_api/test_call_signatures.py::test_return PASSED [ 84%] >test/test_api/test_call_signatures.py::test_call_signature_on_module PASSED [ 84%] >test/test_api/test_call_signatures.py::test_complex PASSED [ 84%] >test/test_api/test_call_signatures.py::test_param_name PASSED [ 84%] >test/test_api/test_call_signatures.py::test_builtins PASSED [ 84%] >test/test_api/test_call_signatures.py::test_signature_is_definition PASSED [ 84%] >test/test_api/test_call_signatures.py::test_no_signature PASSED [ 84%] >test/test_api/test_call_signatures.py::test_dict_literal_in_incomplete_call PASSED [ 85%] >test/test_api/test_call_signatures.py::test_completion_interference PASSED [ 85%] >test/test_api/test_call_signatures.py::test_keyword_argument_index PASSED [ 85%] >test/test_api/test_call_signatures.py::test_bracket_start PASSED [ 85%] >test/test_api/test_call_signatures.py::test_different_caller PASSED [ 85%] >test/test_api/test_call_signatures.py::test_in_function PASSED [ 85%] >test/test_api/test_call_signatures.py::test_lambda_params PASSED [ 85%] >test/test_api/test_call_signatures.py::test_class_creation PASSED [ 85%] >test/test_api/test_call_signatures.py::test_call_magic_method PASSED [ 85%] >test/test_api/test_classes.py::test_is_keyword PASSED [ 85%] >test/test_api/test_classes.py::test_basedefinition_type PASSED [ 85%] >test/test_api/test_classes.py::test_basedefinition_type_import PASSED [ 85%] >test/test_api/test_classes.py::test_function_call_signature_in_doc PASSED [ 85%] >test/test_api/test_classes.py::test_param_docstring PASSED [ 85%] >test/test_api/test_classes.py::test_class_call_signature PASSED [ 85%] >test/test_api/test_classes.py::test_position_none_if_builtin PASSED [ 85%] >test/test_api/test_classes.py::test_completion_docstring PASSED [ 85%] >test/test_api/test_classes.py::test_completion_params PASSED [ 85%] >test/test_api/test_classes.py::test_hashlib_params PASSED [ 86%] >test/test_api/test_classes.py::test_signature_params PASSED [ 86%] >test/test_api/test_classes.py::test_param_endings PASSED [ 86%] >test/test_api/test_classes.py::TestIsDefinition::test_import PASSED [ 86%] >test/test_api/test_classes.py::TestIsDefinition::test_name PASSED [ 86%] >test/test_api/test_classes.py::TestIsDefinition::test_stmt PASSED [ 86%] >test/test_api/test_classes.py::TestParent::test_on_function PASSED [ 86%] >test/test_api/test_classes.py::TestParent::test_parent PASSED [ 86%] >test/test_api/test_classes.py::test_parent_on_completion PASSED [ 86%] >test/test_api/test_classes.py::test_type PASSED [ 86%] >test/test_api/test_classes.py::test_type_II PASSED [ 86%] >test/test_api/test_classes.py::test_goto_assignment_repetition PASSED [ 86%] >test/test_api/test_classes.py::test_goto_assignments_named_params PASSED [ 86%] >test/test_api/test_classes.py::test_class_call PASSED [ 86%] >test/test_api/test_classes.py::test_parentheses PASSED [ 86%] >test/test_api/test_classes.py::test_import PASSED [ 86%] >test/test_api/test_classes.py::test_import_alias PASSED [ 86%] >test/test_api/test_classes.py::test_added_equals_to_params PASSED [ 87%] >test/test_api/test_completion.py::test_in_whitespace PASSED [ 87%] >test/test_api/test_completion.py::test_empty_init PASSED [ 87%] >test/test_api/test_completion.py::test_in_empty_space PASSED [ 87%] >test/test_api/test_completion.py::test_indent_context PASSED [ 87%] >test/test_api/test_completion.py::test_keyword_context PASSED [ 87%] >test/test_api/test_completion.py::test_os_nowait PASSED [ 87%] >test/test_api/test_completion.py::test_points_in_completion PASSED [ 87%] >test/test_api/test_completion.py::test_loading_unicode_files_with_bad_global_charset PASSED [ 87%] >test/test_api/test_completion.py::test_fake_subnodes PASSED [ 87%] >test/test_api/test_completion.py::test_generator PASSED [ 87%] >test/test_api/test_completion.py::test_in_comment PASSED [ 87%] >test/test_api/test_completion.py::test_async PASSED [ 87%] >test/test_api/test_completion.py::test_with_stmt_error_recovery PASSED [ 87%] >test/test_api/test_defined_names.py::TestDefinedNames::test_dotted_assignment PASSED [ 87%] >test/test_api/test_defined_names.py::TestDefinedNames::test_get_definitions_flat PASSED [ 87%] >test/test_api/test_defined_names.py::TestDefinedNames::test_multiple_assignment PASSED [ 87%] >test/test_api/test_defined_names.py::TestDefinedNames::test_multiple_imports PASSED [ 88%] >test/test_api/test_defined_names.py::TestDefinedNames::test_nested_class PASSED [ 88%] >test/test_api/test_defined_names.py::TestDefinedNames::test_nested_definitions PASSED [ 88%] >test/test_api/test_defined_names.py::test_follow_imports PASSED [ 88%] >test/test_api/test_defined_names.py::test_names_twice PASSED [ 88%] >test/test_api/test_environment.py::test_sys_path PASSED [ 88%] >test/test_api/test_environment.py::test_find_system_environments PASSED [ 88%] >test/test_api/test_environment.py::test_versions[2.7] PASSED [ 88%] >test/test_api/test_environment.py::test_versions[3.3] SKIPPED [ 88%] >test/test_api/test_environment.py::test_versions[3.4] SKIPPED [ 88%] >test/test_api/test_environment.py::test_versions[3.5] PASSED [ 88%] >test/test_api/test_environment.py::test_versions[3.6] PASSED [ 88%] >test/test_api/test_environment.py::test_versions[3.7] PASSED [ 88%] >test/test_api/test_environment.py::test_load_module PASSED [ 88%] >test/test_api/test_environment.py::test_error_in_environment PASSED [ 88%] >test/test_api/test_environment.py::test_stdout_in_subprocess PASSED [ 88%] >test/test_api/test_environment.py::test_killed_subprocess PASSED [ 88%] >test/test_api/test_environment.py::test_not_existing_virtualenv PASSED [ 89%] >test/test_api/test_environment.py::test_working_venv PASSED [ 89%] >test/test_api/test_environment.py::test_scanning_venvs PASSED [ 89%] >test/test_api/test_environment.py::test_create_environment_venv_path PASSED [ 89%] >test/test_api/test_environment.py::test_create_environment_executable PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithGotoDefinitions::test_builtin PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithGotoDefinitions::test_from_import PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithGotoDefinitions::test_os_path_join PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithGotoDefinitions::test_tuple_mapping PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithCompletions::test_builtin PASSED [ 89%] >test/test_api/test_full_name.py::TestFullNameWithCompletions::test_os_path_join PASSED [ 89%] >test/test_api/test_full_name.py::TestFullDefinedName::test_imports PASSED [ 89%] >test/test_api/test_full_name.py::TestFullDefinedName::test_local_names PASSED [ 89%] >test/test_api/test_full_name.py::test_sub_module PASSED [ 89%] >test/test_api/test_full_name.py::test_os_path PASSED [ 89%] >test/test_api/test_full_name.py::test_os_issues PASSED [ 89%] >test/test_api/test_interpreter.py::test_builtin_details PASSED [ 89%] >test/test_api/test_interpreter.py::test_numpy_like_non_zero PASSED [ 90%] >test/test_api/test_interpreter.py::test_nested_resolve PASSED [ 90%] >test/test_api/test_interpreter.py::test_side_effect_completion PASSED [ 90%] >test/test_api/test_interpreter.py::test_complete_raw_function PASSED [ 90%] >test/test_api/test_interpreter.py::test_complete_raw_function_different_name PASSED [ 90%] >test/test_api/test_interpreter.py::test_complete_raw_module PASSED [ 90%] >test/test_api/test_interpreter.py::test_complete_raw_instance PASSED [ 90%] >test/test_api/test_interpreter.py::test_list PASSED [ 90%] >test/test_api/test_interpreter.py::test_slice PASSED [ 90%] >test/test_api/test_interpreter.py::test_getitem_side_effects PASSED [ 90%] >test/test_api/test_interpreter.py::test_property_error_oldstyle PASSED [ 90%] >test/test_api/test_interpreter.py::test_property_error_newstyle PASSED [ 90%] >test/test_api/test_interpreter.py::test_param_completion PASSED [ 90%] >test/test_api/test_interpreter.py::test_endless_yield PASSED [ 90%] >test/test_api/test_interpreter.py::test_completion_params SKIPPED [ 90%] >test/test_api/test_interpreter.py::test_completion_param_annotations SKIPPED [ 90%] >test/test_api/test_interpreter.py::test_keyword_argument PASSED [ 90%] >test/test_api/test_interpreter.py::test_more_complex_instances PASSED [ 91%] >test/test_api/test_interpreter.py::test_repr_execution_issue PASSED [ 91%] >test/test_api/test_interpreter.py::test_dir_magic_method PASSED [ 91%] >test/test_api/test_interpreter.py::test_name_not_findable PASSED [ 91%] >test/test_api/test_keyword.py::test_goto_assignments_keyword PASSED [ 91%] >test/test_api/test_keyword.py::test_keyword PASSED [ 91%] >test/test_api/test_project.py::test_django_default_project PASSED [ 91%] >test/test_api/test_settings.py::test_add_dynamic_mods <- test/helpers.py SKIPPED [ 91%] >test/test_api/test_unicode.py::test_unicode_script PASSED [ 91%] >test/test_api/test_unicode.py::test_unicode_attribute PASSED [ 91%] >test/test_api/test_unicode.py::test_multibyte_script PASSED [ 91%] >test/test_api/test_unicode.py::test_goto_definition_at_zero PASSED [ 91%] >test/test_api/test_unicode.py::test_complete_at_zero PASSED [ 91%] >test/test_api/test_unicode.py::test_wrong_encoding PASSED [ 91%] >test/test_api/test_usages.py::test_import_usage PASSED [ 91%] >test/test_evaluate/test_absolute_import.py::test_can_complete_when_shadowing <- test/helpers.py PASSED [ 91%] >test/test_evaluate/test_annotations.py::test_simple_annotations PASSED [ 91%] >test/test_evaluate/test_annotations.py::test_illegal_forward_references[assert 1] PASSED [ 92%] >test/test_evaluate/test_annotations.py::test_illegal_forward_references[1] PASSED [ 92%] >test/test_evaluate/test_annotations.py::test_illegal_forward_references[def x(): pass] PASSED [ 92%] >test/test_evaluate/test_annotations.py::test_illegal_forward_references[1, 2] PASSED [ 92%] >test/test_evaluate/test_annotations.py::test_illegal_forward_references[1\n] PASSED [ 92%] >test/test_evaluate/test_annotations.py::test_lambda_forward_references PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_buildout_detection <- test/helpers.py PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_parent_dir_with_file <- test/helpers.py PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_sys_path_with_modifications <- test/helpers.py PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_append_on_non_sys_path PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_path_from_invalid_sys_path_assignment PASSED [ 92%] >test/test_evaluate/test_buildout_detection.py::test_path_from_sys_path_assignment PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_simple PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_fake_loading PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_fake_docstr PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_parse_function_doc_illegal_docstr PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_doc PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_string_literals PASSED [ 92%] >test/test_evaluate/test_compiled.py::test_method_completion PASSED [ 93%] >test/test_evaluate/test_compiled.py::test_time_docstring PASSED [ 93%] >test/test_evaluate/test_compiled.py::test_dict_values PASSED [ 93%] >test/test_evaluate/test_context.py::test_module_attributes PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_attribute_docstring <- ../../../../../../../usr/lib64/python2.7/unittest/case.py SKIPPED [ 93%] >test/test_evaluate/test_docstring.py::test_multiple_docstrings <- ../../../../../../../usr/lib64/python2.7/unittest/case.py SKIPPED [ 93%] >test/test_evaluate/test_docstring.py::test_function_doc PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_class_doc PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_instance_doc PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_completion PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_docstrings_type_dotted_import PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_docstrings_param_type PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_docstrings_type_str PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_docstring_instance PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_docstring_keyword PASSED [ 93%] >test/test_evaluate/test_docstring.py::test_numpydoc_parameters SKIPPED [ 93%] >test/test_evaluate/test_docstring.py::test_numpydoc_parameters_set_of_values SKIPPED [ 93%] >test/test_evaluate/test_docstring.py::test_numpydoc_parameters_alternative_types SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_invalid SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_returns SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_returns_set_of_values SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_returns_alternative_types SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_returns_list_of SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_returns_obj SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpydoc_yields SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpy_returns SKIPPED [ 94%] >test/test_evaluate/test_docstring.py::test_numpy_comp_returns SKIPPED [ 94%] >test/test_evaluate/test_extension.py::test_completions PASSED [ 94%] >test/test_evaluate/test_extension.py::test_call_signatures_extension PASSED [ 94%] >test/test_evaluate/test_extension.py::test_call_signatures_stdlib PASSED [ 94%] >test/test_evaluate/test_fstring.py::test_fstring_multiline PASSED [ 94%] >test/test_evaluate/test_helpers.py::test_call_of_leaf_in_brackets PASSED [ 94%] >test/test_evaluate/test_implicit_namespace_package.py::test_implicit_namespace_package PASSED [ 94%] >test/test_evaluate/test_implicit_namespace_package.py::test_implicit_nested_namespace_package PASSED [ 94%] >test/test_evaluate/test_implicit_namespace_package.py::test_implicit_namespace_package_import_autocomplete PASSED [ 95%] >test/test_evaluate/test_implicit_namespace_package.py::test_namespace_package_in_multiple_directories_autocompletion PASSED [ 95%] >test/test_evaluate/test_implicit_namespace_package.py::test_namespace_package_in_multiple_directories_goto_definition PASSED [ 95%] >test/test_evaluate/test_implicit_namespace_package.py::test_namespace_name_autocompletion_full_name PASSED [ 95%] >test/test_evaluate/test_imports.py::test_not_importable_file <- test/helpers.py PASSED [ 95%] >test/test_evaluate/test_imports.py::test_import_not_in_sys_path <- test/helpers.py PASSED [ 95%] >test/test_evaluate/test_imports.py::test_complete_on_empty_import <- test/helpers.py PASSED [ 95%] >test/test_evaluate/test_imports.py::test_find_module_py33 SKIPPED [ 95%] >test/test_evaluate/test_imports.py::test_find_module_package PASSED [ 95%] >test/test_evaluate/test_imports.py::test_find_module_not_package PASSED [ 95%] >test/test_evaluate/test_imports.py::test_find_module_package_zipped PASSED [ 95%] >test/test_evaluate/test_imports.py::test_find_module_not_package_zipped PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext import foo; foo.-Foo] PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext import bar; bar.-Bar] PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext import baz; baz.-Baz] PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext import moo; moo.-Moo] PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext.-foo] PASSED [ 95%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext.-bar] PASSED [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext.-baz] PASSED [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[from flask.ext.-moo] PASSED [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[import flask.ext.foo; flask.ext.foo.-Foo] xfail [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[import flask.ext.bar; flask.ext.bar.-Foo] xfail [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[import flask.ext.baz; flask.ext.baz.-Foo] xfail [ 96%] >test/test_evaluate/test_imports.py::test_flask_ext[import flask.ext.moo; flask.ext.moo.-Foo] xfail [ 96%] >test/test_evaluate/test_imports.py::test_import_unique PASSED [ 96%] >test/test_evaluate/test_imports.py::test_cache_works_with_sys_path_param PASSED [ 96%] >test/test_evaluate/test_imports.py::test_import_completion_docstring PASSED [ 96%] >test/test_evaluate/test_imports.py::test_goto_definition_on_import PASSED [ 96%] >test/test_evaluate/test_imports.py::test_imports_on_global_namespace_without_path PASSED [ 96%] >test/test_evaluate/test_imports.py::test_named_import PASSED [ 96%] >test/test_evaluate/test_imports.py::test_goto_following_on_imports SKIPPED [ 96%] >test/test_evaluate/test_imports.py::test_goto_assignments PASSED [ 96%] >test/test_evaluate/test_imports.py::test_os_after_from PASSED [ 96%] >test/test_evaluate/test_imports.py::test_os_issues PASSED [ 96%] >test/test_evaluate/test_imports.py::test_path_issues PASSED [ 97%] >test/test_evaluate/test_imports.py::test_compiled_import_none PASSED [ 97%] >test/test_evaluate/test_literals.py::test_f_strings PASSED [ 97%] >test/test_evaluate/test_literals.py::test_rb_strings PASSED [ 97%] >test/test_evaluate/test_literals.py::test_thousand_separators PASSED [ 97%] >test/test_evaluate/test_mixed.py::test_on_code PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_definition PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg.ns2_folder.nested import foo-nested!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg.ns2_folder import foo-ns2_folder!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg.ns2_file import foo-ns2_file!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg.ns1_folder import foo-ns1_folder!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg.ns1_file import foo-ns1_file!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_goto_assignment[from pkg import foo-ns1!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_simple_completions PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_completions[from pkg import ns2_folder as x-ns2_folder!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_completions[from pkg import ns2_file as x-ns2_file!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_completions[from pkg.ns2_folder import nested as x-nested!] PASSED [ 97%] >test/test_evaluate/test_namespace_package.py::test_completions[from pkg import ns1_folder as x-ns1_folder!] PASSED [ 98%] >test/test_evaluate/test_namespace_package.py::test_completions[from pkg import ns1_file as x-ns1_file!] PASSED [ 98%] >test/test_evaluate/test_namespace_package.py::test_completions[import pkg as x-ns1!] PASSED [ 98%] >test/test_evaluate/test_namespace_package.py::test_nested_namespace_package PASSED [ 98%] >test/test_evaluate/test_precedence.py::test_equals[1 == 1] PASSED [ 98%] >test/test_evaluate/test_precedence.py::test_equals[1.0 == 1] PASSED [ 98%] >test/test_evaluate/test_precedence.py::test_equals[... == ...] PASSED [ 98%] >test/test_evaluate/test_representation.py::test_function_execution PASSED [ 98%] >test/test_evaluate/test_representation.py::test_class_mro PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_namedtuple_str[n-expected0] PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_namedtuple_str[s-expected1] PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_namedtuple_list PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_namedtuple_content PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_nested_namedtuples PASSED [ 98%] >test/test_evaluate/test_stdlib.py::test_namedtuple_goto_definitions PASSED [ 98%] >test/test_evaluate/test_sys_path.py::test_paths_from_assignment PASSED [ 98%] >test/test_evaluate/test_sys_path.py::test_venv_and_pths PASSED [ 98%] >test/test_parso_integration/test_basic.py::test_form_feed_characters PASSED [ 99%] >test/test_parso_integration/test_basic.py::test_if PASSED [ 99%] >test/test_parso_integration/test_basic.py::test_class_and_if PASSED [ 99%] >test/test_parso_integration/test_basic.py::test_add_to_end PASSED [ 99%] >test/test_parso_integration/test_basic.py::test_tokenizer_with_string_literal_backslash PASSED [ 99%] >test/test_parso_integration/test_basic.py::test_ellipsis_without_getitem PASSED [ 99%] >test/test_parso_integration/test_error_correction.py::test_error_correction_with PASSED [ 99%] >test/test_parso_integration/test_error_correction.py::test_string_literals PASSED [ 99%] >test/test_parso_integration/test_error_correction.py::test_incomplete_function PASSED [ 99%] >test/test_parso_integration/test_error_correction.py::test_decorator_string_issue PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::TestCallAndName::test_name_and_call_positions PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::TestCallAndName::test_call_type PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::TestCallAndName::test_literal_type PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::test_user_statement_on_import PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::test_hex_values_in_docstring PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::test_get_call_signature[def my_function(x, typed: Type, z): > return-my_function(x, typed: Type, z)] PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::test_get_call_signature[def my_function(x, y, z) -> str: > return-my_function(x, y, z) -> str] PASSED [ 99%] >test/test_parso_integration/test_parser_utils.py::test_get_call_signature[lambda x, y, z: x + y * z >-<lambda>(x, y, z)] PASSED [100%] > >=================================================== FAILURES =================================================== >_________________________________________ test_completion[classes:572] _________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/classes.py:572 u'Foo().b'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09841f2e90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:178: in eval_trailer > name_or_str=node >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f09841f2ed0> >context = <AnonymousInstanceFunctionExecution: <Function: comprehension_definition@569-571>> >tree_name = <Name: b@570,27> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_________________________________________ test_completion[usages:282] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:282 u'x = 32'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09840a1a10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:282 u'x = 32'> >actual = [('usages', 283, 0), ('usages', 285, 1), ('usages', 285, 7), ('usages', 285, 12)] >desired = [('usages', 283, 0), ('usages', 285, 12)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:282 u'x = 32'> failed. >E actual = [('usages', 283, 0), ('usages', 285, 1), ('usages', 285, 7), ('usages', 285, 12)] >E desired = [('usages', 283, 0), ('usages', 285, 12)] >E >E assert [('usages', 2...es', 285, 12)] == [('usages', 28...es', 285, 12)] >E At index 1 diff: ('usages', 285, 1) != ('usages', 285, 12) >E Left contains more items, first extra item: ('usages', 285, 7) >E Full diff: >E + [('usages', 283, 0), ('usages', 285, 12)] >E - [('usages', 283, 0), >E - ('usages', 285, 1), >E - ('usages', 285, 7), >E - ('usages', 285, 12)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:284] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:284 u'[x for x in x]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0983ad7e10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:284 u'[x for x in x]'> >actual = [('usages', 283, 0), ('usages', 285, 1), ('usages', 285, 7), ('usages', 285, 12)] >desired = [('usages', 283, 0), ('usages', 285, 12)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:284 u'[x for x in x]'> failed. >E actual = [('usages', 283, 0), ('usages', 285, 1), ('usages', 285, 7), ('usages', 285, 12)] >E desired = [('usages', 283, 0), ('usages', 285, 12)] >E >E assert [('usages', 2...es', 285, 12)] == [('usages', 28...es', 285, 12)] >E At index 1 diff: ('usages', 285, 1) != ('usages', 285, 12) >E Left contains more items, first extra item: ('usages', 285, 7) >E Full diff: >E + [('usages', 283, 0), ('usages', 285, 12)] >E - [('usages', 283, 0), >E - ('usages', 285, 1), >E - ('usages', 285, 7), >E - ('usages', 285, 12)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:287] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:287 u'x = 32'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09841d5250> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:287 u'x = 32'> >actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ...] >desired = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:287 u'x = 32'> failed. >E actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ('usages', 296, 7)] >E desired = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] >E >E assert [('usages', 2... 296, 1), ...] == [('usages', 28...es', 290, 12)] >E Left contains more items, first extra item: ('usages', 294, 1) >E Full diff: >E + [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] >E - [('usages', 288, 0), >E - ('usages', 290, 1), >E - ('usages', 290, 12), >E - ('usages', 294, 1), >E - ('usages', 294, 7), >E - ('usages', 296, 1), >E - ('usages', 296, 7)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:289] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:289 u'[x for b in x]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0983ff9050> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:289 u'[x for b in x]'> >actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ...] >desired = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:289 u'[x for b in x]'> failed. >E actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ('usages', 296, 7)] >E desired = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] >E >E assert [('usages', 2... 296, 1), ...] == [('usages', 28...es', 290, 12)] >E Left contains more items, first extra item: ('usages', 294, 1) >E Full diff: >E + [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12)] >E - [('usages', 288, 0), >E - ('usages', 290, 1), >E - ('usages', 290, 12), >E - ('usages', 294, 1), >E - ('usages', 294, 7), >E - ('usages', 296, 1), >E - ('usages', 296, 7)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:293] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:293 u'[x for x in something]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f098426a450> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:293 u'[x for x in something]'> >actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ...] >desired = [('usages', 294, 1), ('usages', 294, 7)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:293 u'[x for x in something]'> failed. >E actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ('usages', 296, 7)] >E desired = [('usages', 294, 1), ('usages', 294, 7)] >E >E assert [('usages', 2... 296, 1), ...] == [('usages', 29...ges', 294, 7)] >E At index 0 diff: ('usages', 288, 0) != ('usages', 294, 1) >E Left contains more items, first extra item: ('usages', 290, 12) >E Full diff: >E + [('usages', 294, 1), ('usages', 294, 7)] >E - [('usages', 288, 0), >E - ('usages', 290, 1), >E - ('usages', 290, 12), >E - ('usages', 294, 1), >E - ('usages', 294, 7), >E - ('usages', 296, 1), >E - ('usages', 296, 7)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:295] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:295 u'[x for x in something]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0984ddc050> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:295 u'[x for x in something]'> >actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ...] >desired = [('usages', 296, 1), ('usages', 296, 7)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:295 u'[x for x in something]'> failed. >E actual = [('usages', 288, 0), ('usages', 290, 1), ('usages', 290, 12), ('usages', 294, 1), ('usages', 294, 7), ('usages', 296, 1), ('usages', 296, 7)] >E desired = [('usages', 296, 1), ('usages', 296, 7)] >E >E assert [('usages', 2... 296, 1), ...] == [('usages', 29...ges', 296, 7)] >E At index 0 diff: ('usages', 288, 0) != ('usages', 296, 1) >E Left contains more items, first extra item: ('usages', 290, 12) >E Full diff: >E + [('usages', 296, 1), ('usages', 296, 7)] >E - [('usages', 288, 0), >E - ('usages', 290, 1), >E - ('usages', 290, 12), >E - ('usages', 294, 1), >E - ('usages', 294, 7), >E - ('usages', 296, 1), >E - ('usages', 296, 7)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:299] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:299 u'{x:1 for x in something}'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f098425de50> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:299 u'{x:1 for x in something}'> >actual = [('usages', 298, 0), ('usages', 300, 1), ('usages', 300, 10), ('usages', 302, 1), ('usages', 302, 10)] >desired = [('usages', 300, 1), ('usages', 300, 10)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:299 u'{x:1 for x in something}'> failed. >E actual = [('usages', 298, 0), ('usages', 300, 1), ('usages', 300, 10), ('usages', 302, 1), ('usages', 302, 10)] >E desired = [('usages', 300, 1), ('usages', 300, 10)] >E >E assert [('usages', 2...es', 302, 10)] == [('usages', 30...es', 300, 10)] >E At index 0 diff: ('usages', 298, 0) != ('usages', 300, 1) >E Left contains more items, first extra item: ('usages', 300, 10) >E Full diff: >E + [('usages', 300, 1), ('usages', 300, 10)] >E - [('usages', 298, 0), >E - ('usages', 300, 1), >E - ('usages', 300, 10), >E - ('usages', 302, 1), >E - ('usages', 302, 10)] > >../test/test_integration.py:16: AssertionError >_________________________________________ test_completion[usages:301] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:301 u'{x:1 for x in something}'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09841a9550> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:274: in run_usages > return compare_cb(self, compare, sorted(wanted)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:301 u'{x:1 for x in something}'> >actual = [('usages', 298, 0), ('usages', 300, 1), ('usages', 300, 10), ('usages', 302, 1), ('usages', 302, 10)] >desired = [('usages', 302, 1), ('usages', 302, 10)] > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/usages.py:301 u'{x:1 for x in something}'> failed. >E actual = [('usages', 298, 0), ('usages', 300, 1), ('usages', 300, 10), ('usages', 302, 1), ('usages', 302, 10)] >E desired = [('usages', 302, 1), ('usages', 302, 10)] >E >E assert [('usages', 2...es', 302, 10)] == [('usages', 30...es', 302, 10)] >E At index 0 diff: ('usages', 298, 0) != ('usages', 302, 1) >E Left contains more items, first extra item: ('usages', 300, 10) >E Full diff: >E + [('usages', 302, 1), ('usages', 302, 10)] >E - [('usages', 298, 0), >E - ('usages', 300, 1), >E - ('usages', 300, 10), >E - ('usages', 302, 1), >E - ('usages', 302, 10)] > >../test/test_integration.py:16: AssertionError >__________________________________________ test_completion[types:95] ___________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/types.py:95 u'a'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09837f8410> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f09837f84d0>, context = <ModuleContext: types@6-134> >tree_name = <Name: a@94,19> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >__________________________________________ test_completion[stdlib:57] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/stdlib.py:57 u'type(lambda: x)'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0983005210> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:245: in run_goto_definitions > should = definition(self.correct, self.start, script.path) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >correct = 'type(x)', correct_start = 0 >path = '/var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/stdlib.py' > > def definition(correct, correct_start, path): > should_be = set() > for match in re.finditer('(?:[^ ]+)', correct): > string = match.group(0) > parser = grammar36.parse(string, start_symbol='eval_input', error_recovery=False) > parser_utils.move(parser.get_root_node(), self.line_nr) > element = parser.get_root_node() > module_context = script._get_module() > # The context shouldn't matter for the test results. > user_context = get_user_scope(module_context, (self.line_nr, 0)) > if user_context.api_type == 'function': > user_context = user_context.get_function_execution() > element.parent = user_context.tree_node > results = evaluator.eval_element(user_context, element) > if not results: > raise Exception('Could not resolve %s on line %s' >> % (match.string, self.line_nr - 1)) >E Exception: Could not resolve type(x) on line 57 > >../test/run.py:236: Exception >_________________________________________ test_completion[arrays:397] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/arrays.py:397 u' i'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e9dfa10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/arrays.py:397 u' i'> >actual = set(['builtins:instance list()']), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/arrays.py:397 u' i'> failed. >E actual = set([u'builtins:instance list()']) >E desired = set([u'builtins:instance int()']) >E >E assert set(['builtin...ance list()']) == set(['builtins...tance int()']) >E Extra items in the left set: >E 'builtins:instance list()' >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([u'builtins:instance list()']) >E ? - ^ >E + set([u'builtins:instance int()']) >E ? ^ > >../test/test_integration.py:16: AssertionError >_______________________________________ test_completion[generators:152] ________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/generators.py:152 u'a'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e933210> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e914f50>, context = <ModuleContext: generators@4-273> >tree_name = <Name: a@151,12> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:8] _______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:8 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e798a90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e798050>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@7,12> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:10] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:10 u'a.insert'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e5ca650> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:206: in run_completion > completions = self.script(environment).completions() >api/__init__.py:174: in completions > completions = completion.completions() >api/completion.py:98: in completions > completion_names = self._get_context_completions() >api/completion.py:198: in _get_context_completions > completion_names += self._trailer_completions(dot.get_previous_leaf()) >api/completion.py:234: in _trailer_completions > contexts = evaluate_call_of_leaf(evaluation_context, previous_leaf) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e5ca710>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@7,12> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:14] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:14 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e91ced0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e91c650>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@13,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:20] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:20 u'y'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea0c190> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097ea0cf90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: y@19,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:24] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:24 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097faa0ed0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097faa0e50>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@23,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:28] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:28 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e81ac50> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e81ac10>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@27,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:33] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:33 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097f8f8ed0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e8995d0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@32,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:35] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:35 u'a[1]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e952e50> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e952cd0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@32,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:37] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:37 u'a[2]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea18910> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097ea18b90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@32,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:41] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:41 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e990050> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e990f90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@40,26> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:47] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:47 u'left'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea1e550> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:47 u'left'> >actual = set([]), desired = set(['builtins:instance str()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:47 u'left'> failed. >E actual = set([]) >E desired = set([u'builtins:instance str()']) >E >E assert set([]) == set(['builtins:instance str()']) >E Extra items in the right set: >E 'builtins:instance str()' >E Full diff: >E - set([]) >E + set([u'builtins:instance str()']) > >../test/test_integration.py:16: AssertionError >______________________________________ test_completion[comprehensions:51] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:51 u"[a for a in {1:'x'}][0]"> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e751150> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e751d10>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@40,26> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:61] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:61 u'([str for x in []])[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e4c0650> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:61 u'([str for x in []])[0]'> >actual = set(['builtins:class str']), desired = set([]) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:61 u'([str for x in []])[0]'> failed. >E actual = set([u'builtins:class str']) >E desired = set([]) >E >E assert set(['builtins:class str']) == set([]) >E Extra items in the left set: >E 'builtins:class str' >E Full diff: >E - set([u'builtins:class str']) >E + set([]) > >../test/test_integration.py:16: AssertionError >______________________________________ test_completion[comprehensions:69] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:69 u'b[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e4c0a90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e4c0450>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@52,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:71] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:71 u'b[1]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea1e950> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:134: in get_item > result |= iterate_contexts(ContextSet(self)) >evaluate/base_context.py:197: in iterate_contexts > for lazy_context in contexts.iterate(contextualized_node, is_async=is_async) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/base_context.py:197: in <genexpr> > for lazy_context in contexts.iterate(contextualized_node, is_async=is_async) >evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e751b50>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@52,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:75] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:75 u'b[0][0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e7f8c90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e7f8910>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: arr@68,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:77] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:77 u'b[1][1]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0980cb7d90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:134: in get_item > result |= iterate_contexts(ContextSet(self)) >evaluate/base_context.py:197: in iterate_contexts > for lazy_context in contexts.iterate(contextualized_node, is_async=is_async) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/base_context.py:197: in <genexpr> > for lazy_context in contexts.iterate(contextualized_node, is_async=is_async) >evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097f927610>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: arr@68,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:81] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:81 u'b[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea0af90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097ea0aa90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@74,35> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:85] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:85 u'b[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e955050> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e9551d0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: b@84,45> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >______________________________________ test_completion[comprehensions:88] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:88 u"[x for x in 'chr'][0]"> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e8126d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e812b50>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: x@62,10> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:105] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:105 u'left'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e7878d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:105 u'left'> >actual = set([]), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:105 u'left'> failed. >E actual = set([]) >E desired = set([u'builtins:instance int()']) >E >E assert set([]) == set(['builtins:instance int()']) >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([]) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:107] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:107 u'right'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e461790> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:107 u'right'> >actual = set([]), desired = set(['builtins:instance str()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:107 u'right'> failed. >E actual = set([]) >E desired = set([u'builtins:instance str()']) >E >E assert set([]) == set(['builtins:instance str()']) >E Extra items in the right set: >E 'builtins:instance str()' >E Full diff: >E - set([]) >E + set([u'builtins:instance str()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:112] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:112 u'next(gen)'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e88e2d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:112 u'next(gen)'> >actual = set([]), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:112 u'next(gen)'> failed. >E actual = set([]) >E desired = set([u'builtins:instance int()']) >E >E assert set([]) == set(['builtins:instance int()']) >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([]) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:114] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:114 u'gen[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e5379d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e5375d0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: i@103,21> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:118] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:118 u'next(gen)'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e46b2d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:118 u'next(gen)'> >actual = set([]), desired = set(['builtins:instance float()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:118 u'next(gen)'> failed. >E actual = set([]) >E desired = set([u'builtins:instance float()']) >E >E assert set([]) == set(['builtins:instance float()']) >E Extra items in the right set: >E 'builtins:instance float()' >E Full diff: >E - set([]) >E + set([u'builtins:instance float()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:121] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:121 u'(i for i in (1,)).send()'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e55eb90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:121 u'(i for i in (1,)).send()'> >actual = set([]), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:121 u'(i for i in (1,)).send()'> failed. >E actual = set([]) >E desired = set([u'builtins:instance int()']) >E >E assert set([]) == set(['builtins:instance int()']) >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([]) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:127] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:127 u'left'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e431d90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:303: in _eval_expr_stmt > context_set = check_tuple_assignments(context.evaluator, c_node, context_set) >evaluate/syntax_tree.py:632: in check_tuple_assignments > context_set = lazy_context.infer() >evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e431d10>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: i@122,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:129] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:129 u'right'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e59db90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:129 u'right'> >actual = set([]), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:129 u'right'> failed. >E actual = set([]) >E desired = set([u'builtins:instance int()']) >E >E assert set([]) == set(['builtins:instance int()']) >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([]) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:148] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:148 u'foo[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e51bd90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:148 u'foo[0]'> >actual = set(['comprehensions:def x']), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:148 u'foo[0]'> failed. >E actual = set([u'comprehensions:def x']) >E desired = set([u'builtins:instance int()']) >E >E assert set(['comprehensions:def x']) == set(['builtins:instance int()']) >E Extra items in the left set: >E 'comprehensions:def x' >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set([u'comprehensions:def x']) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:150] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:150 u'foo[1]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e487b10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:150 u'foo[1]'> >actual = set(['comprehensions:def x']), desired = set(['builtins:instance str()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:150 u'foo[1]'> failed. >E actual = set([u'comprehensions:def x']) >E desired = set([u'builtins:instance str()']) >E >E assert set(['comprehensions:def x']) == set(['builtins:instance str()']) >E Extra items in the left set: >E 'comprehensions:def x' >E Extra items in the right set: >E 'builtins:instance str()' >E Full diff: >E - set([u'comprehensions:def x']) >E + set([u'builtins:instance str()']) > >../test/test_integration.py:16: AssertionError >_____________________________________ test_completion[comprehensions:163] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:163 u' x'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0983ae0c10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:299: in _eval_expr_stmt > context_set = context.eval_node(rhs) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e9c7a10>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@214,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:167] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:167 u'X([1]).foo()'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea122d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:299: in _eval_expr_stmt > context_set = context.eval_node(rhs) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097ea12550>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@214,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:176] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:176 u'list({a - 1: 3 for a in [1]})[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e431710> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/instance.py:131: in py__getitem__ > return self.execute_function_slots(names, index_obj) >evaluate/context/instance.py:90: in execute_function_slots > for name in names >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/instance.py:90: in <genexpr> > for name in names >evaluate/filters.py:45: in execute_evaluated > return self.infer().execute_evaluated(*args, **kwargs) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:74: in execute_evaluated > return self.execute(arguments) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:178: in eval_trailer > name_or_str=node >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:322: in _eval_expr_stmt > ordered = list(cn.infer().iterate(cn)) >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:323: in py__iter__ > types |= self._defining_context.eval_node(k) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e5cac90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@117,32> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:180] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:180 u'list(d)[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e8c7750> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/instance.py:131: in py__getitem__ > return self.execute_function_slots(names, index_obj) >evaluate/context/instance.py:90: in execute_function_slots > for name in names >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/instance.py:90: in <genexpr> > for name in names >evaluate/filters.py:45: in execute_evaluated > return self.infer().execute_evaluated(*args, **kwargs) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:74: in execute_evaluated > return self.execute(arguments) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:178: in eval_trailer > name_or_str=node >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:322: in _eval_expr_stmt > ordered = list(cn.infer().iterate(cn)) >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:323: in py__iter__ > types |= self._defining_context.eval_node(k) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e8c7050>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@177,19> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:182] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:182 u'd.values()[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e8168d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/filters.py:343: in py__call__ > return self._method(self.parent_context) >evaluate/context/iterable.py:393: in _imitate_values > lazy_context = LazyKnownContexts(self.dict_values()) >evaluate/context/iterable.py:211: in dict_values > for k, v in self._items() >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/iterable.py:211: in <genexpr> > for k, v in self._items() >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e816ed0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: b@84,45> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:184] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:184 u'd[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e37be10> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:300: in py__getitem__ > for k in self._defining_context.eval_node(key): >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e37bc90>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@177,19> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:186] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:186 u'd[1]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e6d3c90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:300: in py__getitem__ > for k in self._defining_context.eval_node(key): >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e6d3cd0>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@177,19> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:188] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:188 u'd[2]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e45c250> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:300: in py__getitem__ > for k in self._defining_context.eval_node(key): >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e45ce10>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@177,19> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:201] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:201 u'[x for x in {a for a in range(10)}][0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e487a50> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e68f750>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: x@147,13> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[comprehensions:204] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:204 u'{a for a in range(10)}.pop()'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e740710> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/instance.py:131: in py__getitem__ > return self.execute_function_slots(names, index_obj) >evaluate/context/instance.py:90: in execute_function_slots > for name in names >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/instance.py:90: in <genexpr> > for name in names >evaluate/filters.py:45: in execute_evaluated > return self.infer().execute_evaluated(*args, **kwargs) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:74: in execute_evaluated > return self.execute(arguments) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:178: in eval_trailer > name_or_str=node >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:322: in _eval_expr_stmt > ordered = list(cn.infer().iterate(cn)) >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:329: in py__iter__ > for node in self._items(): >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <SequenceLiteralContext of PythonNode(atom, [<Operator: {>, PythonNode(dictors..., [<Name: a@205,1>, <SyncCompFor: for a in range(10)@205,3>]), <Operator: }>])> > > def _items(self): > c = self.atom.children > > if self.atom.type in ('testlist_star_expr', 'testlist'): > return c[::2] > > array_node = c[1] > if array_node in (']', '}', ')'): > return [] # Direct closing bracket, doesn't contain items. > > if array_node.type == 'testlist_comp': > return array_node.children[::2] > elif array_node.type == 'dictorsetmaker': > kv = [] > iterator = iter(array_node.children) > for key in iterator: > op = next(iterator, None) > if op is None or op == ',': > kv.append(key) # A set. > else: >> assert op == ':' # A dict. >E AssertionError > >evaluate/context/iterable.py:362: AssertionError >_____________________________________ test_completion[comprehensions:206] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1...ompletion/comprehensions.py:206 u"{b for a in [[3.0], ['']] for b in a}.pop()"> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e955490> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/instance.py:131: in py__getitem__ > return self.execute_function_slots(names, index_obj) >evaluate/context/instance.py:90: in execute_function_slots > for name in names >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/instance.py:90: in <genexpr> > for name in names >evaluate/filters.py:45: in execute_evaluated > return self.infer().execute_evaluated(*args, **kwargs) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:74: in execute_evaluated > return self.execute(arguments) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:178: in eval_trailer > name_or_str=node >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:554: in tree_name_to_contexts > types = _remove_statements(evaluator, context, node, tree_name) >evaluate/syntax_tree.py:496: in _remove_statements > return eval_expr_stmt(context, stmt, seek_name=name) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:283: in eval_expr_stmt > return _eval_expr_stmt(context, stmt, seek_name) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:322: in _eval_expr_stmt > ordered = list(cn.infer().iterate(cn)) >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:669: in py__iter__ > for lazy in lazy_context.infer().iterate(): >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:329: in py__iter__ > for node in self._items(): >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <SequenceLiteralContext of PythonNode(atom, [<Operator: {>, PythonNode(dictors...,1>, <SyncCompFor: for a in [[3.0], ['']] for b in a@207,3>]), <Operator: }>])> > > def _items(self): > c = self.atom.children > > if self.atom.type in ('testlist_star_expr', 'testlist'): > return c[::2] > > array_node = c[1] > if array_node in (']', '}', ')'): > return [] # Direct closing bracket, doesn't contain items. > > if array_node.type == 'testlist_comp': > return array_node.children[::2] > elif array_node.type == 'dictorsetmaker': > kv = [] > iterator = iter(array_node.children) > for key in iterator: > op = next(iterator, None) > if op is None or op == ',': > kv.append(key) # A set. > else: >> assert op == ':' # A dict. >E AssertionError > >evaluate/context/iterable.py:362: AssertionError >_____________________________________ test_completion[comprehensions:209] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:209 u'next(iter({a for a in range(10)}))'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097ea4a0d0> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/compiled/context.py:59: in py__call__ > ).py__call__(params) >evaluate/context/function.py:95: in py__call__ > return self.infer_function_execution(function_execution) >evaluate/context/function.py:85: in infer_function_execution > return function_execution.get_return_values() >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:167: in get_return_values > context_set |= self.eval_node(children[1]) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:97: in eval_node > context_set = eval_trailer(context, context_set, trailer) >evaluate/syntax_tree.py:183: in eval_trailer > return base_contexts.execute(args) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/base_context.py:62: in execute > context_set = func(arguments) >evaluate/filters.py:343: in py__call__ > return self._method(self.parent_context) >evaluate/context/iterable.py:58: in py__next__ > return ContextSet.from_sets(lazy_context.infer() for lazy_context in self.py__iter__()) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/iterable.py:58: in <genexpr> > return ContextSet.from_sets(lazy_context.infer() for lazy_context in self.py__iter__()) >evaluate/context/function.py:213: in get_yield_lazy_contexts > types = self.get_return_values(check_yields=True) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/recursion.py:87: in wrapper > result = func(execution, **kwargs) >evaluate/context/function.py:158: in get_return_values > for lazy_context in self._get_yield_lazy_context(r) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/context/function.py:158: in <genexpr> > for lazy_context in self._get_yield_lazy_context(r) >evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >evaluate/syntax_tree.py:549: in tree_name_to_contexts > is_async=node.parent.type == 'async_stmt', >evaluate/base_context.py:197: in iterate_contexts > for lazy_context in contexts.iterate(contextualized_node, is_async=is_async) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/base_context.py:196: in <genexpr> > lazy_context.infer() >evaluate/base_context.py:265: in iterate > for lazy_contexts in zip_longest(*type_iters): >evaluate/context/iterable.py:329: in py__iter__ > for node in self._items(): >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <SequenceLiteralContext of PythonNode(atom, [<Operator: {>, PythonNode(dictors...[<Name: a@210,11>, <SyncCompFor: for a in range(10)@210,13>]), <Operator: }>])> > > def _items(self): > c = self.atom.children > > if self.atom.type in ('testlist_star_expr', 'testlist'): > return c[::2] > > array_node = c[1] > if array_node in (']', '}', ')'): > return [] # Direct closing bracket, doesn't contain items. > > if array_node.type == 'testlist_comp': > return array_node.children[::2] > elif array_node.type == 'dictorsetmaker': > kv = [] > iterator = iter(array_node.children) > for key in iterator: > op = next(iterator, None) > if op is None or op == ',': > kv.append(key) # A set. > else: >> assert op == ':' # A dict. >E AssertionError > >evaluate/context/iterable.py:362: AssertionError >_____________________________________ test_completion[comprehensions:213] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/comprehensions.py:213 u'[a for a in {1, 2, 3}][0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e484350> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:312: in py__getitem__ > return self._defining_context.eval_node(node) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e484450>, context = <ModuleContext: comprehensions@7-215> >tree_name = <Name: a@210,17> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_____________________________________ test_completion[dynamic_params:130] ______________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/dynamic_params.py:130 u' return foo'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e70cb90> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:137: in evaluate_goto_definition > return evaluator.goto_definitions(context, leaf) >evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:142: in infer > return self.get_param().infer() >evaluate/dynamic.py:46: in infer > return ContextSet.from_sets(p.infer() for p in self._executed_params) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/dynamic.py:46: in <genexpr> > return ContextSet.from_sets(p.infer() for p in self._executed_params) >evaluate/param.py:34: in infer > return self._lazy_context.infer() >evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e70c2d0>, context = <ModuleContext: dynamic_params@1-151> >tree_name = <Name: n@133,29> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_________________________________________ test_completion[invalid:151] _________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/invalid.py:151 u'a[0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e820150> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:98: in evaluate_call_of_leaf > values = context.eval_node(base) >evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >evaluate/syntax_tree.py:202: in eval_atom > search_global=True >_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >debug.py:79: in wrapper > return func(*args, **kwargs) >evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >common/context.py:34: in from_sets > sets = list(sets) >evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097ea53a10>, context = <ModuleContext: invalid@1-215> >tree_name = <Name: a@149,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >evaluate/syntax_tree.py:570: ValueError >_________________________________________ test_completion[lambdas:112] _________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/lambdas.py:112 u'[a for a in [1,2] if lambda: 3][0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097e1a3e50> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:248: in run_goto_definitions > return compare_cb(self, is_str, should) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/lambdas.py:112 u'[a for a in [1,2] if lambda: 3][0]'> >actual = set(['lambdas:def <lambda>']), desired = set(['builtins:instance int()']) > > def assert_case_equal(case, actual, desired): > """ > Assert ``actual == desired`` with formatted message. > > This is not needed for typical py.test use case, but as we need > ``--assert=plain`` (see ../pytest.ini) to workaround some issue > due to py.test magic, let's format the message by hand. > """ >> assert actual == desired, """ > Test %r failed. > actual = %s > desired = %s > """ % (case, actual, desired) >E AssertionError: >E Test <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/lambdas.py:112 u'[a for a in [1,2] if lambda: 3][0]'> failed. >E actual = set(['lambdas:def <lambda>']) >E desired = set([u'builtins:instance int()']) >E >E assert set(['lambdas:def <lambda>']) == set(['builtins:instance int()']) >E Extra items in the left set: >E 'lambdas:def <lambda>' >E Extra items in the right set: >E 'builtins:instance int()' >E Full diff: >E - set(['lambdas:def <lambda>']) >E + set([u'builtins:instance int()']) > >../test/test_integration.py:16: AssertionError >__________________________________________ test_completion[async_:65] __________________________________________ > >case = <IntegrationTestCase: /var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1/test/completion/async_.py:65 u' [x async for x in asgen()][0]'> >monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f097dc06790> >environment = <Environment: 3.6.9 in /usr>, has_typing = True > > def test_completion(case, monkeypatch, environment, has_typing): > skip_reason = case.get_skip_reason(environment) > if skip_reason is not None: > pytest.skip(skip_reason) > > _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') > if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): > pytest.skip('Needs the typing module installed to run this test.') > repo_root = helpers.root_dir > monkeypatch.chdir(os.path.join(repo_root, 'jedi')) >> case.run(assert_case_equal, environment) > >../test/test_integration.py:44: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >../test/run.py:203: in run > return testers[self.test_type](compare_cb, environment) >../test/run.py:246: in run_goto_definitions > result = script.goto_definitions() >api/__init__.py:197: in goto_definitions > definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf) >api/helpers.py:143: in evaluate_goto_definition > return evaluate_call_of_leaf(context, leaf) >evaluate/helpers.py:101: in evaluate_call_of_leaf > values = eval_trailer(context, values, trailer) >evaluate/syntax_tree.py:171: in eval_trailer > ContextualizedNode(context, trailer) >common/context.py:65: in mapper > for context in self._set >common/context.py:34: in from_sets > sets = list(sets) >common/context.py:65: in <genexpr> > for context in self._set >evaluate/base_context.py:132: in get_item > result |= getitem(index) >evaluate/context/iterable.py:222: in py__getitem__ > all_types = list(self.py__iter__()) >evaluate/context/iterable.py:178: in py__iter__ > for set_ in self._iterate(): >evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >evaluate/utils.py:20: in wrapper > return list(func(*args, **kwargs)) >evaluate/context/iterable.py:174: in _iterate > for result in self._nested(comp_fors): >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <ListComprehension of PythonNode(atom, [<Operator: [>, PythonNode(testlist_com... [<Keyword: async>, <SyncCompFor: for x in asgen()@66,13>])]), <Operator: ]>])> >comp_fors = (PythonNode(comp_for, [<Keyword: async>, <SyncCompFor: for x in asgen()@66,13>]),) >parent_context = None > > def _nested(self, comp_fors, parent_context=None): > comp_for = comp_fors[0] > >> is_async = 'async' == comp_for.children[comp_for.children.index('for') - 1] >E ValueError: 'for' is not in list > >evaluate/context/iterable.py:142: ValueError >___________________________________ test_static_analysis[attribute_error.py] ___________________________________ > >static_analysis_case = <StaticAnalysisCase: attribute_error.py>, environment = <Environment: 3.6.9 in /usr> > > def test_static_analysis(static_analysis_case, environment): > if static_analysis_case.skip is not None: > pytest.skip(static_analysis_case.skip) > else: >> static_analysis_case.run(assert_static_analysis, environment) > >test/test_integration.py:51: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >test/conftest.py:118: in run > environment=environment, >jedi/api/__init__.py:325: in _analysis > defs = self._evaluator.goto_definitions(context, node) >jedi/evaluate/__init__.py:234: in goto_definitions > return helpers.evaluate_call_of_leaf(context, name) >jedi/evaluate/helpers.py:73: in evaluate_call_of_leaf > return context.eval_node(leaf) >jedi/evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >jedi/evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >jedi/evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >jedi/evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >jedi/evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >jedi/debug.py:79: in wrapper > return func(*args, **kwargs) >jedi/evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >jedi/evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >jedi/evaluate/syntax_tree.py:202: in eval_atom > search_global=True >jedi/_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >jedi/evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >jedi/debug.py:79: in wrapper > return func(*args, **kwargs) >jedi/evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >jedi/evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >jedi/common/context.py:34: in from_sets > sets = list(sets) >jedi/evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >jedi/evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097e02ac10>, context = <ModuleContext: attribute_error@1-120> >tree_name = <Name: r@72,7> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >jedi/evaluate/syntax_tree.py:570: ValueError >___________________________________ test_static_analysis[comprehensions.py] ____________________________________ > >static_analysis_case = <StaticAnalysisCase: comprehensions.py>, environment = <Environment: 3.6.9 in /usr> > > def test_static_analysis(static_analysis_case, environment): > if static_analysis_case.skip is not None: > pytest.skip(static_analysis_case.skip) > else: >> static_analysis_case.run(assert_static_analysis, environment) > >test/test_integration.py:51: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >test/conftest.py:118: in run > environment=environment, >jedi/api/__init__.py:328: in _analysis > try_iter_content(defs) >jedi/evaluate/arguments.py:28: in try_iter_content > try_iter_content(lazy_context.infer(), depth + 1) >jedi/evaluate/lazy_context.py:45: in infer > return self._context.eval_node(self.data) >jedi/evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >jedi/evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >jedi/evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >jedi/evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >jedi/evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >jedi/debug.py:79: in wrapper > return func(*args, **kwargs) >jedi/evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >jedi/evaluate/syntax_tree.py:146: in eval_node > return eval_or_test(context, element) >jedi/evaluate/syntax_tree.py:338: in eval_or_test > types = context.eval_node(next(iterator)) >jedi/evaluate/base_context.py:145: in eval_node > return self.evaluator.eval_element(self, node) >jedi/evaluate/__init__.py:194: in eval_element > return self._eval_element_if_evaluated(context, element) >jedi/evaluate/__init__.py:206: in _eval_element_if_evaluated > return self._eval_element_cached(context, element) >jedi/evaluate/cache.py:40: in wrapper > rv = function(obj, *args, **kwargs) >jedi/evaluate/__init__.py:210: in _eval_element_cached > return eval_node(context, element) >jedi/debug.py:79: in wrapper > return func(*args, **kwargs) >jedi/evaluate/syntax_tree.py:48: in wrapper > return func(context, *args, **kwargs) >jedi/evaluate/syntax_tree.py:72: in eval_node > return eval_atom(context, element) >jedi/evaluate/syntax_tree.py:202: in eval_atom > search_global=True >jedi/_compatibility.py:263: in <lambda> > return lambda *args, **kwargs: self.func(obj, *args, **kwargs) >jedi/evaluate/base_context.py:162: in py__getattribute__ > return f.find(filters, attribute_lookup=not search_global) >jedi/debug.py:79: in wrapper > return func(*args, **kwargs) >jedi/evaluate/finder.py:67: in find > types = self._names_to_types(names, attribute_lookup) >jedi/evaluate/finder.py:178: in _names_to_types > contexts = ContextSet.from_sets(name.infer() for name in names) >jedi/common/context.py:34: in from_sets > sets = list(sets) >jedi/evaluate/finder.py:178: in <genexpr> > contexts = ContextSet.from_sets(name.infer() for name in names) >jedi/evaluate/filters.py:108: in infer > return tree_name_to_contexts(self.parent_context.evaluator, self.parent_context, self.tree_name) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >evaluator = <jedi.evaluate.Evaluator object at 0x7f097f9e4bd0>, context = <ModuleContext: comprehensions@1-43> >tree_name = <Name: a@1,11> > > def tree_name_to_contexts(evaluator, context, tree_name): > > context_set = ContextSet() > module_node = context.get_root_context().tree_node > if module_node is not None: > names = module_node.get_used_names().get(tree_name.value, []) > for name in names: > expr_stmt = name.parent > > correct_scope = parser_utils.get_parent_scope(name) == context.tree_node > > if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign" and correct_scope: > context_set |= _evaluate_for_annotation(context, expr_stmt.children[1].children[1]) > > if context_set: > return context_set > > types = [] > node = tree_name.get_definition(import_name_always=True) > if node is None: > node = tree_name.parent > if node.type == 'global_stmt': > context = evaluator.create_context(context, tree_name) > finder = NameFinder(evaluator, context, context, tree_name.value) > filters = finder.get_filters(search_global=True) > # For global_stmt lookups, we only need the first possible scope, > # which means the function itself. > filters = [next(filters)] > return finder.find(filters, attribute_lookup=False) > elif node.type not in ('import_from', 'import_name'): > raise ValueError("Should not happen. type: %s", node.type) > > typ = node.type > if typ == 'for_stmt': > types = pep0484.find_type_from_comment_hint_for(context, node, tree_name) > if types: > return types > if typ == 'with_stmt': > types = pep0484.find_type_from_comment_hint_with(context, node, tree_name) > if types: > return types > > if typ in ('for_stmt', 'comp_for'): > try: > types = context.predefined_names[node][tree_name.value] > except KeyError: > cn = ContextualizedNode(context, node.children[3]) > for_types = iterate_contexts( > cn.infer(), > contextualized_node=cn, > is_async=node.parent.type == 'async_stmt', > ) > c_node = ContextualizedName(context, tree_name) > types = check_tuple_assignments(evaluator, c_node, for_types) > elif typ == 'expr_stmt': > types = _remove_statements(evaluator, context, node, tree_name) > elif typ == 'with_stmt': > context_managers = context.eval_node(node.get_test_node_from_name(tree_name)) > enter_methods = context_managers.py__getattribute__(u'__enter__') > return enter_methods.execute_evaluated() > elif typ in ('import_from', 'import_name'): > types = imports.infer_import(context, tree_name) > elif typ in ('funcdef', 'classdef'): > types = _apply_decorators(context, node) > elif typ == 'try_stmt': > # TODO an exception can also be a tuple. Check for those. > # TODO check for types that are not classes and add it to > # the static analysis report. > exceptions = context.eval_node(tree_name.get_previous_sibling().get_previous_sibling()) > types = exceptions.execute_evaluated() > else: >> raise ValueError("Should not happen. type: %s" % typ) >E ValueError: Should not happen. type: sync_comp_for > >jedi/evaluate/syntax_tree.py:570: ValueError >=============================================== warnings summary =============================================== >test/test_evaluate/test_imports.py:81: RemovedInPytest4Warning: Applying marks directly to parameters is deprecated, please use pytest.param(..., marks=...) instead. >For more details, see: https://docs.pytest.org/en/latest/parametrize.html > @pytest.mark.parametrize("code,name", [ >test/test_evaluate/test_imports.py:81: RemovedInPytest4Warning: Applying marks directly to parameters is deprecated, please use pytest.param(..., marks=...) instead. >For more details, see: https://docs.pytest.org/en/latest/parametrize.html > @pytest.mark.parametrize("code,name", [ >test/test_evaluate/test_imports.py:81: RemovedInPytest4Warning: Applying marks directly to parameters is deprecated, please use pytest.param(..., marks=...) instead. >For more details, see: https://docs.pytest.org/en/latest/parametrize.html > @pytest.mark.parametrize("code,name", [ >test/test_evaluate/test_imports.py:81: RemovedInPytest4Warning: Applying marks directly to parameters is deprecated, please use pytest.param(..., marks=...) instead. >For more details, see: https://docs.pytest.org/en/latest/parametrize.html > @pytest.mark.parametrize("code,name", [ > >-- Docs: https://docs.pytest.org/en/latest/warnings.html >================== 62 failed, 1619 passed, 29 skipped, 4 xfailed, 4 warnings in 83.93 seconds ================== > * ERROR: dev-python/jedi-0.12.1::gentoo failed (test phase): > * Tests failed under python2.7 > * > * Call stack: > * ebuild.sh, line 125: Called src_test > * environment, line 2680: Called distutils-r1_src_test > * environment, line 900: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 346: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 2199: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1555: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1553: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 558: Called distutils-r1_run_phase 'python_test' > * environment, line 831: Called python_test > * environment, line 2582: Called die > * The specific snippet of code: > * py.test -vv jedi test || die "Tests failed under ${EPYTHON}" > * > * If you need support, post the output of `emerge --info '=dev-python/jedi-0.12.1::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/jedi-0.12.1::gentoo'`. > * The complete build log is located at '/var/log/portage/build/dev-python/jedi-0.12.1:20190804-164302.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/jedi-0.12.1/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/jedi-0.12.1/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1' > * S: '/var/tmp/portage/dev-python/jedi-0.12.1/work/jedi-0.12.1'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 691432
: 585674