From 4c6efb7113e695b8c6f387162312cc98f6cbd17f Mon Sep 17 00:00:00 2001 From: baztian Date: Fri, 10 Mar 2017 11:27:55 +0100 Subject: [PATCH] Fix coveralls run on Python 2.6. Skip coveralls for Jython. --- ci/run_coveralls.py | 4 ++++ tox.ini | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ci/run_coveralls.py b/ci/run_coveralls.py index 6bbf61d..35e719b 100644 --- a/ci/run_coveralls.py +++ b/ci/run_coveralls.py @@ -5,11 +5,15 @@ http://stackoverflow.com/a/33012308/1960601 """ import os +import sys from subprocess import call if __name__ == '__main__': + if sys.platform.lower().startswith('java'): + print("Export to coveralls skipped for Jython") + sys.exit(0) if 'TRAVIS' in os.environ: rc = call('coveralls') raise SystemExit(rc) diff --git a/tox.ini b/tox.ini index cbcbe8a..9c76df3 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,9 @@ setenv = driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest deps = py26: unittest2==0.5.1 + # urllib3 required by coveralls. See https://github.com/eddyxu/cpp-coveralls/issues/108 + py26: urllib3[secure] + py: JPype1==0.6.2 jip==0.9.10 coveralls @@ -29,6 +32,6 @@ commands = driver-sqliteXerial: jip install org.xerial:sqlite-jdbc:3.7.2 driver-mock: mvn -Dmaven.repo.local={toxworkdir}/shared/.m2/repository -f mockdriver/pom.xml install driver-mock: jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT - coverage run --source {envsitepackagesdir}/jaydebeapi test/testsuite.py {env:TESTNAME} + coverage run -a --source {envsitepackagesdir}/jaydebeapi test/testsuite.py {env:TESTNAME} driver-hsqldb: coverage run -a --source {envsitepackagesdir}/jaydebeapi test/doctests.py python ci/run_coveralls.py