This commit is contained in:
David Halter
2012-09-06 11:23:12 +02:00
parent 61cb267dd5
commit 844e222ed5
6 changed files with 20 additions and 19 deletions

View File

@@ -30,7 +30,6 @@ class TestRegression(unittest.TestCase):
"A.different_line"
)
in_name = 2, 9
under_score = 2, 8
cls = 2, 7
@@ -55,29 +54,29 @@ class TestRegression(unittest.TestCase):
self.assertRaises(functions.NotFoundError, get_def, cls)
def test_keyword_doc(self):
r = list(self.get_def("or", (1,1)))
r = list(self.get_def("or", (1, 1)))
assert len(r) == 1
if not is_py25:
assert len(r[0].doc) > 100
r = list(self.get_def("asfdasfd", (1,1)))
r = list(self.get_def("asfdasfd", (1, 1)))
assert len(r) == 0
def test_operator_doc(self):
r = list(self.get_def("a == b", (1,3)))
r = list(self.get_def("a == b", (1, 3)))
assert len(r) == 1
if not is_py25:
assert len(r[0].doc) > 100
def test_get_definition_at_zero(self):
assert self.get_def("a", (1,1)) == set()
s = self.get_def("str", (1,1))
assert self.get_def("a", (1, 1)) == set()
s = self.get_def("str", (1, 1))
assert len(s) == 1
assert list(s)[0].description == 'class str'
assert self.get_def("", (1,0)) == set()
assert self.get_def("", (1, 0)) == set()
def test_complete_at_zero(self):
s = self.complete("str", (1,3))
s = self.complete("str", (1, 3))
assert len(s) == 1
assert list(s)[0].word == 'str'

View File

@@ -7,7 +7,7 @@ import traceback
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
sys.path.append('.')
from _compatibility import unicode, BytesIO, reduce, literal_eval
from _compatibility import unicode, BytesIO, reduce, literal_eval, is_py25
import functions
import debug
@@ -185,8 +185,7 @@ def test_dir(completion_test_dir, thirdparty=False):
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 sys.hexversion < 0x02060000 \
and f_name in ['generators.py', 'types.py']:
if is_py25 and f_name in ['generators.py', 'types.py']:
continue
if thirdparty: