Skip to content

Commit

Permalink
Remove tests error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 25, 2016
1 parent c71c70f commit 2be7154
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions test/rplugin/python3/deoplete/test_filter.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import deoplete.util as util

def test_fuzzy_escapse(self):
def test_fuzzy_escapse():
assert fuzzy_escape('foo', 0) == 'f[^f]*o[^o]*o[^o]*'
assert fuzzy_escape('foo', 1) == 'f[^f]*o[^o]*o[^o]*'
assert fuzzy_escape('Foo', 1) == 'F[^F]*[oO].*[oO].*'

def test_overlap_length(self):
def test_overlap_length():
assert overlap_length('foo bar', 'bar baz') == 3
assert overlap_length('foobar', 'barbaz') == 3
assert overlap_length('foob', 'baz') == 1
assert overlap_length('foobar', 'foobar') == 6
assert overlap_length('тест', 'ст') == len('ст')

def test_charwidth(self):
def test_charwidth():
assert charwidth('f') == 1
assert charwidth('あ') == 2

def test_strwidth(self):
def test_strwidth():
assert strwidth('foo bar') == 7
assert strwidth('あいうえ') == 8
assert strwidth('fooあい') == 7

def test_truncate(self):
def test_truncate():
assert truncate('foo bar', 3) == 'foo'
assert truncate('fooあい', 5) == 'fooあ'
assert truncate('あいうえ', 4) == 'あい'
assert truncate('fooあい', 4) == 'foo'

def test_skipping(self):
def test_skipping():
assert truncate_skipping('foo bar', 3, '..', 3) == '..bar'
assert truncate_skipping('foo bar', 6, '..', 3) == 'f..bar'
assert truncate_skipping('fooあい', 5, '..', 3) == 'f..い'
Expand Down
4 changes: 2 additions & 2 deletions test/rplugin/python3/deoplete/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ def test_pos():
assert util.charpos2bytepos('utf-8', 'foo bar', 3) == 3
assert util.charpos2bytepos('utf-8', 'あああ', 3) == 9

def test_custom(self):
def test_custom():
custom = {'_': {'mark': ''}, 'java': {'converters': []}}
assert get_custom(custom, 'java', 'mark', 'foobar') == ''
assert get_custom(custom, 'java', 'converters', 'foobar') == []
assert get_custom(custom, 'foo', 'mark', 'foobar') == ''
assert get_custom(custom, 'foo', 'converters', 'foobar') == 'foobar'


def test_globruntime(self):
def test_globruntime():
assert globruntime('/usr', 'bin') == ['/usr/bin']

0 comments on commit 2be7154

Please sign in to comment.