From 46804cd858987d9d41608c07a13f0152996b015e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 2 Dec 2018 20:48:46 -0700 Subject: [PATCH] Fixing test failures --- .travis.yml | 25 ++++++++++++------------- bin/autojump_utils.py | 1 + tests/unit/autojump_match_test.py | 10 +++++----- tests/unit/autojump_utils_test.py | 1 + tox.ini | 4 ++++ 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 72c40c9..3481254 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,17 @@ language: python -matrix: - include: - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - - python: 3.5 - env: TOXENV=py35 - - python: 3.6 - env: TOXENV=py36 - +python: + - 2.6 + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - 3.6 + - 3.7 + install: - - pip install tox + - pip install mock coverage ipdb ipython pytest pre-commit autopep8 flake8 script: - - tox + - coverage run --source=bin/ --omit=bin/autojump_argparse.py -m py.test -vv -rxs --tb native -s --strict + - coverage report -m diff --git a/bin/autojump_utils.py b/bin/autojump_utils.py index d1c48ab..d0445c5 100644 --- a/bin/autojump_utils.py +++ b/bin/autojump_utils.py @@ -13,6 +13,7 @@ from itertools import islice if sys.version_info[0] == 3: imap = map + unicode = str os.getcwdu = os.getcwd else: from itertools import imap diff --git a/tests/unit/autojump_match_test.py b/tests/unit/autojump_match_test.py index bd02ff5..3b82391 100644 --- a/tests/unit/autojump_match_test.py +++ b/tests/unit/autojump_match_test.py @@ -19,8 +19,8 @@ class TestMatchAnywhere(object): entry4 = Entry('/中/zhong/国/guo', 10) entry5 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10) win_entry1 = Entry('C:\\foo\\bar\\baz', 10) - win_entry2 = Entry('D:\Program Files (x86)\GIMP', 10) - win_entry3 = Entry('C:\Windows\System32', 10) + win_entry2 = Entry('D:\\Program Files (x86)\\GIMP', 10) + win_entry3 = Entry('C:\\Windows\\System32', 10) @pytest.fixture def haystack(self): @@ -75,9 +75,9 @@ class TestMatchConsecutive(object): entry4 = Entry('/中/zhong/国/guo', 10) entry5 = Entry('/日/本', 10) entry6 = Entry('/is\'t/this/a/b*tchin/edge/case?', 10) - win_entry1 = Entry('C:\Foo\Bar\Baz', 10) - win_entry2 = Entry('D:\Program Files (x86)\GIMP', 10) - win_entry3 = Entry('C:\Windows\System32', 10) + win_entry1 = Entry('C:\\Foo\\Bar\\Baz', 10) + win_entry2 = Entry('D:\\Program Files (x86)\\GIMP', 10) + win_entry3 = Entry('C:\\Windows\\System32', 10) @pytest.fixture def haystack(self): diff --git a/tests/unit/autojump_utils_test.py b/tests/unit/autojump_utils_test.py index 07f67b3..202734d 100644 --- a/tests/unit/autojump_utils_test.py +++ b/tests/unit/autojump_utils_test.py @@ -25,6 +25,7 @@ from autojump_utils import unico if is_python3(): os.getcwdu = os.getcwd xrange = range + unicode = str def u(string): diff --git a/tox.ini b/tox.ini index cdc230f..35008b7 100644 --- a/tox.ini +++ b/tox.ini @@ -32,3 +32,7 @@ commands = [pytest] norecursedirs = .git .tox docs + +[pycodestyle] +ignore = E731,W504 +max-line-length = 131