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 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 # The following hooks (pytest_configure, pytest_unconfigure) are used

View File

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

View File

@@ -2,7 +2,9 @@
addopts = --doctest-modules addopts = --doctest-modules
# Ignore broken files in blackbox test directories # 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 # 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 # fine as long as we are using `clean_jedi_cache` as a session scoped