From 6ee724a1ce9a40c54cf7d29c19d3a5bd0ff9f0f5 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sun, 1 Apr 2018 20:50:03 +0200 Subject: [PATCH] Enable testing for python3 too. (#955) This gives us back testing parity to before CI broke - and hooray, all tests still pass! --- .travis.yml | 3 +++ test/vim_test_case.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d13d5a..86be95d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,9 @@ env: - VIM_VERSION="7.4" PYTHON_IMAGE=2.7-stretch TAG=vim_74_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_74_py2.tar.gz - VIM_VERSION="8.0" PYTHON_IMAGE=2.7-stretch TAG=vim_80_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_80_py2.tar.gz - VIM_VERSION="git" PYTHON_IMAGE=2.7-stretch TAG=vim_git_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_git_py2.tar.gz + - VIM_VERSION="7.4" PYTHON_IMAGE=3.6-stretch TAG=vim_74_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_74_py3.tar.gz + - VIM_VERSION="8.0" PYTHON_IMAGE=3.6-stretch TAG=vim_80_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_80_py3.tar.gz + - VIM_VERSION="git" PYTHON_IMAGE=3.6-stretch TAG=vim_git_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_git_py3.tar.gz before_install: scripts/load_docker_cache.sh install: diff --git a/test/vim_test_case.py b/test/vim_test_case.py index 4d91c37..90e4dab 100644 --- a/test/vim_test_case.py +++ b/test/vim_test_case.py @@ -184,7 +184,10 @@ class VimTestCase(unittest.TestCase, TempFileManager): if not self.interrupt: # Go into insert mode and type the keys but leave Vim some time to # react. - text = u'i' + self.keys.decode("utf-8") + if PYTHON3: + text = 'i' + self.keys + else: + text = u'i' + self.keys.decode("utf-8") while text: to_send = None for seq in SEQUENCES: