mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44: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()
|
rel_path = self.get_relative_path()
|
||||||
with common.ignored(ImportError):
|
with common.ignored(ImportError):
|
||||||
current_namespace = follow_str(rel_path, '__init__')
|
current_namespace = follow_str(rel_path, '__init__')
|
||||||
else:
|
elif current_namespace[2]: # is a package
|
||||||
for n in self._namespace_packages(current_namespace[1],
|
for n in self._namespace_packages(current_namespace[1],
|
||||||
self.import_path[:i]):
|
self.import_path[:i]):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
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
|
norecursedirs = .* docs completion refactor absolute_import namespace_package
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
foo = 'ns1!'
|
foo = 'ns1!'
|
||||||
|
|
||||||
# this is a namespace package
|
# this is a namespace package
|
||||||
try
|
try:
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
pkg_resources.declare_namespace(__name__)
|
pkg_resources.declare_namespace(__name__)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user