Ignore __main__ modules

This commit is contained in:
Dave Halter
2017-12-11 09:23:13 +01:00
parent 3a7bc92863
commit fa2712a128
3 changed files with 13 additions and 7 deletions

View File

@@ -5,7 +5,11 @@ import pytest
import jedi
collect_ignore = ["setup.py"]
collect_ignore = [
'setup.py',
'__main__.py',
'jedi/evaluate/compiled/subprocess/__main__.py'
]
# The following hooks (pytest_configure, pytest_unconfigure) are used

View File

@@ -12,12 +12,12 @@ class Project(object):
if sys_path is not None:
self._base_sys_path = sys_path
venv = os.getenv('VIRTUAL_ENV')
if venv:
sys_path = get_venv_path(venv)
if sys_path is None:
sys_path = sys.path
venv = os.getenv('VIRTUAL_ENV')
if venv:
sys_path = get_venv_path(venv)
else:
sys_path = sys.path
base_sys_path = list(sys_path)
try:

View File

@@ -2,7 +2,9 @@
addopts = --doctest-modules
# Ignore broken files in blackbox test directories
norecursedirs = .* docs completion refactor absolute_import namespace_package scripts extensions speed static_analysis not_in_sys_path buildout_project sample_venvs init_extension_module simple_import
norecursedirs = .* docs completion refactor absolute_import namespace_package
scripts extensions speed static_analysis not_in_sys_path buildout_project
sample_venvs init_extension_module simple_import
# Activate `clean_jedi_cache` fixture for all tests. This should be
# fine as long as we are using `clean_jedi_cache` as a session scoped