merge with dev branch

This commit is contained in:
David Halter
2013-05-03 01:28:50 +04:30
21 changed files with 84 additions and 168 deletions

View File

@@ -98,14 +98,14 @@ Tests look like this::
"""
import os
import re
from ast import literal_eval
if __name__ == '__main__':
import sys
sys.path.insert(0, '..')
import jedi
from jedi._compatibility import unicode, StringIO, reduce, is_py25, \
literal_eval
from jedi._compatibility import unicode, reduce, StringIO
TEST_COMPLETIONS = 0
@@ -259,11 +259,6 @@ def collect_dir_tests(base_dir, test_files, check_thirdparty=False):
files_to_execute = [a for a in test_files.items() if a[0] in f_name]
lines_to_execute = reduce(lambda x, y: x + y[1], files_to_execute, [])
if f_name.endswith(".py") and (not test_files or files_to_execute):
# for python2.5 certain tests are not being done, because it
# only has these features partially.
if is_py25 and f_name in ['generators.py', 'types.py']:
continue
skip = None
if check_thirdparty:
lib = f_name.replace('_.py', '')

View File

@@ -14,7 +14,7 @@ import textwrap
from .base import TestBase, unittest, cwd_at
import jedi
from jedi._compatibility import is_py25, utf8, unicode
from jedi._compatibility import utf8, unicode
from jedi import api
api_classes = api.api_classes
@@ -86,8 +86,7 @@ class TestRegression(TestBase):
def test_keyword_doc(self):
r = list(self.definition("or", (1, 1)))
assert len(r) == 1
if not is_py25:
assert len(r[0].doc) > 100
assert len(r[0].doc) > 100
r = list(self.definition("asfdasfd", (1, 1)))
assert len(r) == 0
@@ -95,8 +94,7 @@ class TestRegression(TestBase):
def test_operator_doc(self):
r = list(self.definition("a == b", (1, 3)))
assert len(r) == 1
if not is_py25:
assert len(r[0].doc) > 100
assert len(r[0].doc) > 100
def test_function_call_signature(self):
defs = self.definition("""
@@ -333,8 +331,6 @@ class TestRegression(TestBase):
assert [d.doc for d in defs]
def test_goto_following_on_imports(self):
if is_py25:
return
g = self.goto("import multiprocessing.dummy; multiprocessing.dummy")
assert len(g) == 1
assert g[0].start_pos != (0, 0)