mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fixing test failures
This commit is contained in:
parent
dcbf5735c7
commit
46804cd858
23
.travis.yml
23
.travis.yml
@ -1,18 +1,17 @@
|
|||||||
language: python
|
language: python
|
||||||
|
|
||||||
matrix:
|
python:
|
||||||
include:
|
- 2.6
|
||||||
- python: 2.7
|
- 2.7
|
||||||
env: TOXENV=py27
|
- 3.3
|
||||||
- python: 3.4
|
- 3.4
|
||||||
env: TOXENV=py34
|
- 3.5
|
||||||
- python: 3.5
|
- 3.6
|
||||||
env: TOXENV=py35
|
- 3.7
|
||||||
- python: 3.6
|
|
||||||
env: TOXENV=py36
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install mock coverage ipdb ipython pytest pre-commit autopep8 flake8
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- tox
|
- coverage run --source=bin/ --omit=bin/autojump_argparse.py -m py.test -vv -rxs --tb native -s --strict
|
||||||
|
- coverage report -m
|
||||||
|
@ -13,6 +13,7 @@ from itertools import islice
|
|||||||
|
|
||||||
if sys.version_info[0] == 3:
|
if sys.version_info[0] == 3:
|
||||||
imap = map
|
imap = map
|
||||||
|
unicode = str
|
||||||
os.getcwdu = os.getcwd
|
os.getcwdu = os.getcwd
|
||||||
else:
|
else:
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
@ -19,8 +19,8 @@ class TestMatchAnywhere(object):
|
|||||||
entry4 = Entry('/中/zhong/国/guo', 10)
|
entry4 = Entry('/中/zhong/国/guo', 10)
|
||||||
entry5 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10)
|
entry5 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10)
|
||||||
win_entry1 = Entry('C:\\foo\\bar\\baz', 10)
|
win_entry1 = Entry('C:\\foo\\bar\\baz', 10)
|
||||||
win_entry2 = Entry('D:\Program Files (x86)\GIMP', 10)
|
win_entry2 = Entry('D:\\Program Files (x86)\\GIMP', 10)
|
||||||
win_entry3 = Entry('C:\Windows\System32', 10)
|
win_entry3 = Entry('C:\\Windows\\System32', 10)
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def haystack(self):
|
def haystack(self):
|
||||||
@ -75,9 +75,9 @@ class TestMatchConsecutive(object):
|
|||||||
entry4 = Entry('/中/zhong/国/guo', 10)
|
entry4 = Entry('/中/zhong/国/guo', 10)
|
||||||
entry5 = Entry('/日/本', 10)
|
entry5 = Entry('/日/本', 10)
|
||||||
entry6 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10)
|
entry6 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10)
|
||||||
win_entry1 = Entry('C:\Foo\Bar\Baz', 10)
|
win_entry1 = Entry('C:\\Foo\\Bar\\Baz', 10)
|
||||||
win_entry2 = Entry('D:\Program Files (x86)\GIMP', 10)
|
win_entry2 = Entry('D:\\Program Files (x86)\\GIMP', 10)
|
||||||
win_entry3 = Entry('C:\Windows\System32', 10)
|
win_entry3 = Entry('C:\\Windows\\System32', 10)
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def haystack(self):
|
def haystack(self):
|
||||||
|
@ -25,6 +25,7 @@ from autojump_utils import unico
|
|||||||
if is_python3():
|
if is_python3():
|
||||||
os.getcwdu = os.getcwd
|
os.getcwdu = os.getcwd
|
||||||
xrange = range
|
xrange = range
|
||||||
|
unicode = str
|
||||||
|
|
||||||
|
|
||||||
def u(string):
|
def u(string):
|
||||||
|
Loading…
Reference in New Issue
Block a user