mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
minor bug/testing fixes for #122
This commit is contained in:
@@ -322,7 +322,7 @@ class ImportPath(pr.Base):
|
||||
rel_path = self.get_relative_path()
|
||||
with common.ignored(ImportError):
|
||||
current_namespace = follow_str(rel_path, '__init__')
|
||||
else:
|
||||
elif current_namespace[2]: # is a package
|
||||
for n in self._namespace_packages(current_namespace[1],
|
||||
self.import_path[:i]):
|
||||
try:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
addopts = --doctest-modules
|
||||
|
||||
# Ignore broken files in blackbox test directories
|
||||
norecursedirs = .* docs completion refactor absolute_import
|
||||
norecursedirs = .* docs completion refactor absolute_import namespace_package
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
foo = 'ns1!'
|
||||
|
||||
# this is a namespace package
|
||||
try
|
||||
try:
|
||||
import pkg_resources
|
||||
pkg_resources.declare_namespace(__name__)
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user