mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
tests for import problems
This commit is contained in:
@@ -318,6 +318,7 @@ class Completion(BaseDefinition):
|
||||
provide additional information about a completion.
|
||||
"""
|
||||
def __init__(self, name, needs_dot, like_name_length, base):
|
||||
print name
|
||||
super(Completion, self).__init__(name.parent, name.start_pos)
|
||||
|
||||
self._name = name
|
||||
|
||||
@@ -235,7 +235,6 @@ A().hello
|
||||
# -----------------
|
||||
# unicode
|
||||
# -----------------
|
||||
|
||||
a = 'smörbröd'
|
||||
#? str()
|
||||
a
|
||||
@@ -243,3 +242,21 @@ xyz = 'smörbröd.py'
|
||||
if 1:
|
||||
#? str()
|
||||
xyz
|
||||
|
||||
# -----------------
|
||||
# exceptions
|
||||
# -----------------
|
||||
try:
|
||||
import math
|
||||
except ImportError as i_a:
|
||||
#? ['i_a']
|
||||
i_a
|
||||
#? ImportError()
|
||||
i_a
|
||||
try:
|
||||
import math
|
||||
except ImportError, i_b:
|
||||
#? ['i_b']
|
||||
i_b
|
||||
#? ImportError()
|
||||
i_b
|
||||
|
||||
Reference in New Issue
Block a user