mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
python 2.5 compatibility
This commit is contained in:
@@ -6,6 +6,7 @@ import unittest
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
||||
sys.path.append('.')
|
||||
|
||||
from _compatibility import is_py25
|
||||
import functions
|
||||
#functions.set_debug_function(functions.debug.print_to_stdout)
|
||||
|
||||
@@ -56,7 +57,8 @@ class TestRegression(unittest.TestCase):
|
||||
def test_keyword_doc(self):
|
||||
r = list(self.get_def("or", (1,1)))
|
||||
assert len(r) == 1
|
||||
assert len(r[0].doc) > 100
|
||||
if not is_py25:
|
||||
assert len(r[0].doc) > 100
|
||||
|
||||
r = list(self.get_def("asfdasfd", (1,1)))
|
||||
assert len(r) == 0
|
||||
@@ -64,7 +66,8 @@ class TestRegression(unittest.TestCase):
|
||||
def test_operator_doc(self):
|
||||
r = list(self.get_def("a == b", (1,3)))
|
||||
assert len(r) == 1
|
||||
assert len(r[0].doc) > 100
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user