move some tests into specific directories

This commit is contained in:
Dave Halter
2014-01-29 20:43:42 +01:00
parent 36de8c427f
commit 78114b12e9
16 changed files with 11 additions and 9 deletions

0
test/api/__init__.py Normal file
View File

View File

@@ -1,6 +1,6 @@
import textwrap
from .helpers import TestCase
from ..helpers import TestCase
from jedi import Script

View File

@@ -5,7 +5,7 @@ Tests for `api.defined_names`.
import textwrap
from jedi import api
from .helpers import TestCase
from ..helpers import TestCase
class TestDefinedNames(TestCase):

View File

@@ -18,7 +18,7 @@ import textwrap
import jedi
from jedi.api import classes
from jedi.evaluate import Evaluator
from .helpers import TestCase
from ..helpers import TestCase
class MixinTestFullName(object):

View File

@@ -2,7 +2,7 @@
Tests of ``jedi.api.Interpreter``.
"""
from .helpers import TestCase
from ..helpers import TestCase
import jedi
from jedi._compatibility import is_py33

View File

@@ -5,6 +5,7 @@ All character set and unicode related tests.
from jedi import Script
from jedi._compatibility import utf8, unicode
def test_unicode_script():
""" normally no unicode objects are being used. (<=2.7) """
s = unicode("import datetime; datetime.timedelta")
@@ -22,6 +23,7 @@ def test_unicode_script():
completions = Script(s).completions()
assert type(completions[0].description) is unicode
def test_unicode_attribute():
""" github jedi-vim issue #94 """
s1 = utf8('#-*- coding: utf-8 -*-\nclass Person():\n'
@@ -33,6 +35,7 @@ def test_unicode_attribute():
completions2 = Script(s2).completions()
assert 'strip' in [c.name for c in completions2]
def test_multibyte_script():
""" `jedi.Script` must accept multi-byte string source. """
try:
@@ -43,4 +46,3 @@ def test_multibyte_script():
pass # python 3 has no unicode method
else:
assert len(Script(s, 1, len(code)).completions())

View File

View File

@@ -4,7 +4,7 @@ Python 2.X)
"""
import jedi
from jedi.parser import Parser
from . import helpers
from .. import helpers
def test_explicit_absolute_imports():

View File

@@ -3,7 +3,7 @@ Testing of docstring related issues and especially ``jedi.docstrings``.
"""
import jedi
from .helpers import unittest
from ..helpers import unittest
class TestDocstring(unittest.TestCase):

View File

@@ -2,7 +2,7 @@ import pytest
import jedi
from jedi._compatibility import find_module_py33
from .helpers import cwd_at
from ..helpers import cwd_at
@pytest.mark.skipif('sys.version_info < (3,3)')

0
test/parser/__init__.py Normal file
View File

View File

@@ -2,6 +2,7 @@ import jedi
import sys
from os.path import dirname, join
def test_namespace_package():
sys.path.insert(0, join(dirname(__file__), 'namespace_package/ns1'))
sys.path.insert(1, join(dirname(__file__), 'namespace_package/ns2'))
@@ -47,7 +48,6 @@ def test_namespace_package():
solution = "statement: foo = '%s'" % solution
assert completion.description == solution
finally:
sys.path.pop(0)
sys.path.pop(0)