mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
remove multileve attributeerror from places, where exception is enough.
This commit is contained in:
@@ -7,7 +7,6 @@ import traceback
|
|||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
import functions
|
import functions
|
||||||
import evaluate
|
|
||||||
from _compatibility import unicode, BytesIO
|
from _compatibility import unicode, BytesIO
|
||||||
|
|
||||||
only_line = int(sys.argv[2]) if len(sys.argv) > 2 else None
|
only_line = int(sys.argv[2]) if len(sys.argv) > 2 else None
|
||||||
@@ -28,7 +27,7 @@ def run_completion_test(correct, source, line_nr, line, path):
|
|||||||
# difference for testing)
|
# difference for testing)
|
||||||
try:
|
try:
|
||||||
completions = functions.complete(source, line_nr, len(line), path)
|
completions = functions.complete(source, line_nr, len(line), path)
|
||||||
except (Exception, functions.evaluate.MultiLevelAttributeError):
|
except Exception:
|
||||||
print('test @%s: %s' % (line_nr - 1, line))
|
print('test @%s: %s' % (line_nr - 1, line))
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
return 1
|
return 1
|
||||||
@@ -51,7 +50,7 @@ def run_definition_test(correct, source, line_nr, line, correct_start, path):
|
|||||||
return set(functions.get_definitions(source, line_nr, indent, path))
|
return set(functions.get_definitions(source, line_nr, indent, path))
|
||||||
try:
|
try:
|
||||||
result = defs(line_nr, len(line))
|
result = defs(line_nr, len(line))
|
||||||
except (Exception, functions.evaluate.MultiLevelAttributeError):
|
except Exception:
|
||||||
print('test @%s: %s' % (line_nr - 1, line))
|
print('test @%s: %s' % (line_nr - 1, line))
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user