diff --git a/.travis.yml b/.travis.yml index 818f521..bd654ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,27 @@ language: python -python: - - "2.7" - - "3.3" - - "3.4" - - "3.5" - +matrix: + include: + - os: linux + python: 2.6 + cache: pip + - os: linux + python: 2.7 + - os: linux + python: 3.3 + - os: linux + python: 3.4 + - os: linux + python: 3.5 + - os: linux + python: 3.6 + - os: linux + python: 3.7 + - os: linux + python: 3.8 + - os: linux + python: 3.9 install: + - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install pycparser==2.18; pip install unittest2; fi - pip install -r requirements.txt - pip install coveralls script: nosetests -s -v --with-coverage --cover-package=inotify diff --git a/inotify/adapters.py b/inotify/adapters.py index 8a67347..1a5baf4 100644 --- a/inotify/adapters.py +++ b/inotify/adapters.py @@ -166,7 +166,7 @@ def _handle_inotify_event(self, wd): header = _INOTIFY_EVENT(*header_raw) type_names = self._get_event_names(header.mask) - _LOGGER.debug("Events received in stream: {}".format(type_names)) + _LOGGER.debug("Events received in stream: {0}".format(type_names)) event_length = (_STRUCT_HEADER_LENGTH + header.len) if length < event_length: @@ -225,7 +225,7 @@ def event_gen( # (fd) looks to always match the inotify FD. names = self._get_event_names(event_type) - _LOGGER.debug("Events received from epoll: {}".format(names)) + _LOGGER.debug("Events received from epoll: {0}".format(names)) for (header, type_names, path, filename) \ in self._handle_inotify_event(fd): diff --git a/tests/test_inotify.py b/tests/test_inotify.py index 0f87524..6ca8040 100644 --- a/tests/test_inotify.py +++ b/tests/test_inotify.py @@ -1,7 +1,11 @@ # -*- coding: utf-8 -*- import os -import unittest +import sys +if sys.version_info < (2, 7): + import unittest2 as unittest +else: + import unittest import inotify.constants import inotify.adapters