Use python3.6 for tests.

This commit is contained in:
Dave Halter
2017-10-10 18:17:11 +02:00
parent 72c1a332d2
commit ce6b60063d
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
sudo: false sudo: false
language: python language: python3.6
env: env:
matrix: matrix:
- ENV=test - ENV=test
@@ -11,7 +11,7 @@ matrix:
install: install:
- | - |
if [ "$ENV" = "test" ]; then if [ "$ENV" = "test" ]; then
pip install pytest python3.6 -m pip install pytest
fi fi
script: script:
- vim --version - vim --version

View File

@@ -1,6 +1,6 @@
import os import os
import subprocess import subprocess
import urllib import urllib.request
import zipfile import zipfile
import pytest import pytest
@@ -33,7 +33,7 @@ def pytest_configure(config):
os.mkdir(CACHE_FOLDER) os.mkdir(CACHE_FOLDER)
if not os.path.exists(VSPEC_FOLDER): if not os.path.exists(VSPEC_FOLDER):
name, hdrs = urllib.urlretrieve(VSPEC_URL) name, hdrs = urllib.request.urlretrieve(VSPEC_URL)
z = zipfile.ZipFile(name) z = zipfile.ZipFile(name)
for n in z.namelist(): for n in z.namelist():
dest = os.path.join(CACHE_FOLDER, n) dest = os.path.join(CACHE_FOLDER, n)
@@ -42,7 +42,7 @@ def pytest_configure(config):
os.makedirs(destdir) os.makedirs(destdir)
data = z.read(n) data = z.read(n)
if not os.path.isdir(dest): if not os.path.isdir(dest):
with open(dest, 'w') as f: with open(dest, 'wb') as f:
f.write(data) f.write(data)
z.close() z.close()
os.chmod(VSPEC_RUNNER, 0o777) os.chmod(VSPEC_RUNNER, 0o777)