mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Merge pull request #909 from ZyX-I/pypy-support
Enable pypy tests in .travis.yml
This commit is contained in:
commit
0810f394f5
@ -5,6 +5,7 @@ python:
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "pypy"
|
||||
install: tests/install.sh
|
||||
script: tests/test.sh
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user