diff --git a/.travis.yml b/.travis.yml index 14195f22..4eccbf31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ python: - "3.2" - "3.3" - "3.4" + - "pypy" install: tests/install.sh script: tests/test.sh diff --git a/powerline/lib/inotify.py b/powerline/lib/inotify.py index 0e8211eb..c2b25444 100644 --- a/powerline/lib/inotify.py +++ b/powerline/lib/inotify.py @@ -46,17 +46,17 @@ def load_inotify(): # inotify_add_watch() prototype = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char_p, ctypes.c_uint32, use_errno=True) add_watch = prototype(('inotify_add_watch', libc), ( - (1, "fd"), (1, "pathname"), (1, "mask")), use_errno=True) + (1, "fd"), (1, "pathname"), (1, "mask"))) # inotify_rm_watch() prototype = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int, use_errno=True) rm_watch = prototype(('inotify_rm_watch', libc), ( - (1, "fd"), (1, "wd")), use_errno=True) + (1, "fd"), (1, "wd"))) # read() prototype = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_int, ctypes.c_void_p, ctypes.c_size_t, use_errno=True) read = prototype(('read', libc), ( - (1, "fd"), (1, "buf"), (1, "count")), use_errno=True) + (1, "fd"), (1, "buf"), (1, "count"))) _inotify = (init1, add_watch, rm_watch, read) return _inotify diff --git a/tests/install.sh b/tests/install.sh index 510e6a96..05d2e3d2 100755 --- a/tests/install.sh +++ b/tests/install.sh @@ -3,8 +3,10 @@ pip install . pip install psutil if python -c 'import sys; sys.exit(1 * (sys.version_info[0] != 2))' ; then # Python 2 - pip install mercurial - pip install --allow-external bzr --allow-unverified bzr bzr + if python -c 'import platform, sys; sys.exit(1 - (platform.python_implementation() == "CPython"))' ; then + pip install mercurial + pip install --allow-external bzr --allow-unverified bzr bzr + fi if python -c 'import sys; sys.exit(1 * (sys.version_info[1] >= 7))' ; then # Python 2.6 pip install unittest2 argparse diff --git a/tests/test_lib.py b/tests/test_lib.py index c69d97b6..fa22da41 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -13,6 +13,7 @@ import threading import os import sys import re +import platform from time import sleep from subprocess import call, PIPE from functools import partial @@ -466,7 +467,8 @@ class TestFilesystemWatchers(TestCase): os.rename(f, f + '1') changed() -use_mercurial = use_bzr = sys.version_info < (3, 0) +use_mercurial = use_bzr = (sys.version_info < (3, 0) + and platform.python_implementation() == 'CPython') class TestVCS(TestCase):