From 875c857d47c356518f5b6e1ad5f84dabb088010e Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 17:36:22 +0200 Subject: [PATCH 01/20] Try to fix some travis issues --- .travis.yml | 13 ++++++------- README_development.rst | 9 ++------- ci/before_install_jython.sh | 1 + tox.ini | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 781e7cf..cdedf9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ +os: linux +dist: focal language: python -# use container-based infrastructure -sudo: false - deploy: provider: pypi - user: cheffe + username: cheffe password: secure: ZQsqnd4Ux3erP0xfLJefJ/90wcJX/L2SfYOZFPbAIwJaX3n9iXf7jOGaT5FzJxLH+c0RJ1varqX0WZo1v0YKRz05IiSCLfZIT3Ia/Cy4nOLLL4a6CFUqzTlO7V1xyKMtQKimWGF5AYTAWvLTPu7cdDeg1YPENrZBYZPvJ/yRiJ4= distributions: "sdist bdist_wheel" @@ -21,14 +20,14 @@ cache: python: - '2.7' - - '3.4' + - '3.5' - '3.6' env: -matrix: +jobs: include: - python: 3.6 - env: JYTHON=org.python:jython-installer:2.7.0 TOXENV="jython-driver-{hsqldb,mock}" + env: JYTHON=org.python:jython-installer:2.7.2 TOXENV="jython-driver-{hsqldb,mock}" before_install: - ci/before_install.sh diff --git a/README_development.rst b/README_development.rst index 312c053..fdd0b14 100644 --- a/README_development.rst +++ b/README_development.rst @@ -19,15 +19,10 @@ Setup test requirements pip install -rdev-requirements.txt # Install Jython 2.7 - ci/mvnget.sh org.python:jython-installer:2.7.0 - java -jar jython-installer-2.7.0.jar && rm jython-installer-2.7.0.jar + ci/mvnget.sh org.python:jython-installer:2.7.2 + java -jar jython-installer-2.7.2.jar && rm jython-installer-2.7.2.jar # add jython to your path - # Install Python 2.6 - sudo add-apt-repository ppa:deadsnakes/ppa - sudo apt-get update - sudo apt-get install python2.6 python2.6-dev - # run tests for all supported envs tox diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 8bdb549..e96346a 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -5,6 +5,7 @@ INST_DIR=$HOME/jython/jython-${JYTHON##*:} if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" + $HOME/jython/bin/pip install --upgrade pip fi mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ diff --git a/tox.ini b/tox.ini index 2f5cd7d..97707e2 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-driver-{h [travis] python = 2.7: py27-driver-{hsqldb,mock,sqliteXerial,sqlitePy}-newjpype, py27-driver-{hsqldb,mock}-oldjpype - 3.4: py34-driver-{hsqldb,mock,sqliteXerial}-newjpype + 3.5: py34-driver-{hsqldb,mock,sqliteXerial}-newjpype 3.6: py36-driver-{hsqldb,mock,sqliteXerial}-newjpype, py36-driver-{hsqldb,mock}-oldjpype [testenv] @@ -19,7 +19,7 @@ setenv = driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest deps = oldjpype: JPype1==0.6.3 - newjpype: JPype1==0.7.4 + newjpype: JPype1==0.7.1 # https://github.com/jiptool/jip/issues/54 #jip==0.9.14 https://github.com/jiptool/jip/archive/0.9.14.tar.gz From 635504943e94d7f3ccb3c304df2cf8db853f34e0 Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 19:45:45 +0200 Subject: [PATCH 02/20] Fix tox configuration file --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 97707e2..98e1a29 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py{27,3}-driver-{hsqldb,mock,sqliteXerial}-newjpype,py{27,3}-driver-{h [travis] python = 2.7: py27-driver-{hsqldb,mock,sqliteXerial,sqlitePy}-newjpype, py27-driver-{hsqldb,mock}-oldjpype - 3.5: py34-driver-{hsqldb,mock,sqliteXerial}-newjpype + 3.5: py35-driver-{hsqldb,mock,sqliteXerial}-newjpype 3.6: py36-driver-{hsqldb,mock,sqliteXerial}-newjpype, py36-driver-{hsqldb,mock}-oldjpype [testenv] From 303dfe9ab6016b2d81530d10a3abb50c35086b58 Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 20:01:37 +0200 Subject: [PATCH 03/20] Downgrade test dependency to JPype 0.7.0 (Recommended for Python 2.7) --- .travis.yml | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cdedf9b..30edcec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ python: - '3.6' env: + jobs: include: - python: 3.6 diff --git a/tox.ini b/tox.ini index 98e1a29..b44885a 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ setenv = driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest deps = oldjpype: JPype1==0.6.3 - newjpype: JPype1==0.7.1 + newjpype: JPype1==0.7.0 # https://github.com/jiptool/jip/issues/54 #jip==0.9.14 https://github.com/jiptool/jip/archive/0.9.14.tar.gz From 9a0aadb0a1f9f3fe4346df513f89571115f52748 Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 20:02:04 +0200 Subject: [PATCH 04/20] Fix tox for Jython --- .travis.yml | 2 +- ci/before_install_jython.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30edcec..61812b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ before_install: install: - pip install coveralls - - pip install tox-travis + - pip install tox==3.9.0 tox-travis script: tox diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index e96346a..c9aef98 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -5,7 +5,8 @@ INST_DIR=$HOME/jython/jython-${JYTHON##*:} if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" - $HOME/jython/bin/pip install --upgrade pip + "$INST_DIR"/bin/pip install --upgrade pip fi +pip install --upgrade virtualenv==16.5.0 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From a8e36590742188c4fe722855b8e6277a7bb2496a Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 21:28:24 +0200 Subject: [PATCH 05/20] Remove unnecessary jython pip upgrade --- ci/before_install_jython.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index c9aef98..491d3ad 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -5,7 +5,6 @@ INST_DIR=$HOME/jython/jython-${JYTHON##*:} if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" - "$INST_DIR"/bin/pip install --upgrade pip fi pip install --upgrade virtualenv==16.5.0 mkdir -p $HOME/bin From cf1b1f90da20d60a646086569dee8615d35101ac Mon Sep 17 00:00:00 2001 From: baztian Date: Mon, 25 May 2020 21:30:38 +0200 Subject: [PATCH 06/20] Downgrade virtualenv to hopefully fix jython build --- ci/before_install_jython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 491d3ad..d32ce5f 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -6,6 +6,6 @@ if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" fi -pip install --upgrade virtualenv==16.5.0 +pip install --upgrade virtualenv==15.0.1 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From 06f7a438c586ba24f18bca0138e6a02b1557ac9c Mon Sep 17 00:00:00 2001 From: baztian Date: Tue, 26 May 2020 15:41:36 +0200 Subject: [PATCH 07/20] Downgrade coverage dependency for Jython runs as Jython doesn't seem to have sqlite3 lib --- .travis.yml | 2 +- ci/before_install_jython.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61812b7..30edcec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ before_install: install: - pip install coveralls - - pip install tox==3.9.0 tox-travis + - pip install tox-travis script: tox diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index d32ce5f..98f7913 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -6,6 +6,6 @@ if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" fi -pip install --upgrade virtualenv==15.0.1 +pip install --upgrade virtualenv==15.0.1 tox==3.9.0 coverage==4.5.4 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From e38a46a356eee968942e3f9a8d0199c56f1c463b Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 14:51:30 +0200 Subject: [PATCH 08/20] Downgrade coverage module *inside* tox env to a version which does not require sqlite which isn't supported by Jython --- tox.ini | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index b44885a..ede26a4 100644 --- a/tox.ini +++ b/tox.ini @@ -20,10 +20,8 @@ setenv = deps = oldjpype: JPype1==0.6.3 newjpype: JPype1==0.7.0 - # https://github.com/jiptool/jip/issues/54 - #jip==0.9.14 - https://github.com/jiptool/jip/archive/0.9.14.tar.gz - coverage + jip==0.9.14 + coverage==4.3.4 commands = python --version python ci/jipconf_subst.py {envdir} {toxworkdir}/shared From f94608e07b50d8ae300ea023f8842f1ad74ab638 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 14:54:28 +0200 Subject: [PATCH 09/20] Align coverage version with the one used outside of tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ede26a4..9683df2 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,7 @@ deps = oldjpype: JPype1==0.6.3 newjpype: JPype1==0.7.0 jip==0.9.14 - coverage==4.3.4 + coverage==4.5.4 commands = python --version python ci/jipconf_subst.py {envdir} {toxworkdir}/shared From 3f10b20c4d6545a4ff8676f5dac2b1aeaef86aab Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 17:42:47 +0200 Subject: [PATCH 10/20] Fix mockito issues --- mockdriver/pom.xml | 6 +++--- tox.ini | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mockdriver/pom.xml b/mockdriver/pom.xml index d896386..c709044 100644 --- a/mockdriver/pom.xml +++ b/mockdriver/pom.xml @@ -8,15 +8,15 @@ jar - 1.7 - 1.7 + 1.8 + 1.8 org.mockito mockito-all - 1.9.5 + 1.10.19 diff --git a/tox.ini b/tox.ini index 9683df2..c61e685 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,9 @@ setenv = driver-sqlitePy: TESTNAME=test_integration.SqlitePyTest deps = oldjpype: JPype1==0.6.3 - newjpype: JPype1==0.7.0 + py35-newjpype: JPype1==0.7.5 + py36-newjpype: JPype1==0.7.5 + py27-newjpype: JPype1==0.7.0 jip==0.9.14 coverage==4.5.4 commands = From 722c3cf22d936c30a18582c05c9be5ed27881b03 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 17:45:14 +0200 Subject: [PATCH 11/20] Ignore some files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 97704fe..063a8b2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ target/ .coverage *.iml .idea/ +.settings/ +.jython_cache/ +.vscode/ From b1df38f9571371bcc1b39092e6d4cbaf5068a0fe Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 17:45:21 +0200 Subject: [PATCH 12/20] Upgrade some mockdriver dependencies --- mockdriver/pom.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mockdriver/pom.xml b/mockdriver/pom.xml index c709044..9faf8d2 100644 --- a/mockdriver/pom.xml +++ b/mockdriver/pom.xml @@ -15,14 +15,14 @@ org.mockito - mockito-all - 1.10.19 + mockito-inline + 3.3.3 junit junit - 4.11 + 4.13 test @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-dependency-plugin - 2.10 + 3.1.2 copy-dependencies @@ -52,13 +52,12 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.2.0 true lib/ - From b75a7b31fcccff45d16cb49dc1a2364aaccbee4f Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:00:10 +0200 Subject: [PATCH 13/20] Improve dev instructions --- README_development.rst | 2 +- dev-requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README_development.rst b/README_development.rst index fdd0b14..cd3e994 100644 --- a/README_development.rst +++ b/README_development.rst @@ -67,4 +67,4 @@ Build a new release 9. Send new version and tags to github origin. :: - $ git push origin master --follow-tags + $ git push --follow-tags && push --tags diff --git a/dev-requirements.txt b/dev-requirements.txt index 2e85e2e..6a51167 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -tox==2.6.0 -wheel==0.29.0 +tox==3.9.0 +wheel==0.34.2 bump2version==1.0.0 twine==1.15.0 From 368660ebffc4b4c63d4a3d0b5d185f673487e07c Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:00:53 +0200 Subject: [PATCH 14/20] Upgrade virtualenv to latest version compatible with Jython --- ci/before_install_jython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 98f7913..4d58ee2 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -6,6 +6,6 @@ if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" fi -pip install --upgrade virtualenv==15.0.1 tox==3.9.0 coverage==4.5.4 +pip install --upgrade virtualenv==16.5.0 tox==3.9.0 coverage==4.5.4 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From 464baa8a8e52d81f5df0aa881d0dfc2ccf3cee7d Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:06:19 +0200 Subject: [PATCH 15/20] Fix README --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 566c09d..1696237 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ .. image:: https://img.shields.io/badge/python-2.7,_3.4,_3.6-blue.svg :target: https://pypi.python.org/pypi/JayDeBeApi/ -.. image:: https://img.shields.io/badge/jython-2.7.0-blue.svg +.. image:: https://img.shields.io/badge/jython-2.7.2-blue.svg :target: https://pypi.python.org/pypi/JayDeBeApi/ .. image:: https://img.shields.io/github/tag/baztian/jaydebeapi.svg @@ -58,10 +58,11 @@ or if you are using Jython use :: $ jython setup.py install -It has been tested with Jython 2.7.0. +It has been tested with Jython 2.7.2. If you are using cPython ensure that you have installed JPype_ -properly. It has been tested with JPype1 0.5.7. Older JPype +properly. It has been tested with JPype1 0.6.3 and 0.7.5 for Python 3 and +with JPype1 0.6.3 and 0.7.0 for Python 2.7. Older JPype installations may cause problems. Usage From b092431e205988d7c9dde15cf6f90cde617b4e1a Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:10:40 +0200 Subject: [PATCH 16/20] Downgrade virtualenv again due to some unknown incompatibilities --- ci/before_install_jython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 4d58ee2..5aa7f17 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -6,6 +6,6 @@ if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" fi -pip install --upgrade virtualenv==16.5.0 tox==3.9.0 coverage==4.5.4 +pip install --upgrade virtualenv==15.1.0 tox==3.9.0 coverage==4.5.4 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From 94247cb2f89ee9d4976caffc557e816370fcc597 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:33:09 +0200 Subject: [PATCH 17/20] Another try with virtualenv 16.5.0 --- ci/before_install_jython.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index 5aa7f17..fd61f8a 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -5,7 +5,8 @@ INST_DIR=$HOME/jython/jython-${JYTHON##*:} if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" + "$INST_DIR"/bin/pip install --upgrade pip fi -pip install --upgrade virtualenv==15.1.0 tox==3.9.0 coverage==4.5.4 +pip install --upgrade virtualenv==16.5.0 tox==3.9.0 coverage==4.5.4 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From 5b80ee6e1030c6b8a1df305f83011c24b62d4611 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:52:10 +0200 Subject: [PATCH 18/20] Revert "Another try with virtualenv 16.5.0" This reverts commit 94247cb2f89ee9d4976caffc557e816370fcc597. --- ci/before_install_jython.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/before_install_jython.sh b/ci/before_install_jython.sh index fd61f8a..5aa7f17 100755 --- a/ci/before_install_jython.sh +++ b/ci/before_install_jython.sh @@ -5,8 +5,7 @@ INST_DIR=$HOME/jython/jython-${JYTHON##*:} if [ ! -d "$INST_DIR" ]; then JYTHON_JAR=$(${TRAVIS_BUILD_DIR}/ci/mvnget.sh "$JYTHON") java -jar ${JYTHON_JAR} -s -d "$INST_DIR" - "$INST_DIR"/bin/pip install --upgrade pip fi -pip install --upgrade virtualenv==16.5.0 tox==3.9.0 coverage==4.5.4 +pip install --upgrade virtualenv==15.1.0 tox==3.9.0 coverage==4.5.4 mkdir -p $HOME/bin ln -s "$INST_DIR"/bin/jython $HOME/bin/ From 81734bf38f060a3efc20b4fd3d3ce72cfe54d5fd Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:52:35 +0200 Subject: [PATCH 19/20] Improve dev-requirements --- dev-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-requirements.txt b/dev-requirements.txt index 6a51167..772a8bf 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,5 @@ tox==3.9.0 +virtualenv==15.1.0 wheel==0.34.2 bump2version==1.0.0 twine==1.15.0 From 08c537863e9129d0bce1005bb83d19557e40ed17 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 27 May 2020 20:53:50 +0200 Subject: [PATCH 20/20] Fix minor bug in test code --- test/test_mock.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_mock.py b/test/test_mock.py index 09443a1..03977a0 100644 --- a/test/test_mock.py +++ b/test/test_mock.py @@ -62,7 +62,7 @@ class MockTest(unittest.TestCase): cursor = self.conn.cursor() try: cursor.execute("dummy stmt") - fail("expected exception") + self.fail("expected exception") except jaydebeapi.DatabaseError as e: self.assertEquals(str(e), "java.sql.SQLException: expected") @@ -71,7 +71,7 @@ class MockTest(unittest.TestCase): cursor = self.conn.cursor() try: cursor.execute("dummy stmt") - fail("expected exception") + self.fail("expected exception") except jaydebeapi.InterfaceError as e: self.assertEquals(str(e), "java.lang.RuntimeException: expected") @@ -79,7 +79,7 @@ class MockTest(unittest.TestCase): self.conn.jconn.mockExceptionOnCommit("java.sql.SQLException", "expected") try: self.conn.commit() - fail("expected exception") + self.fail("expected exception") except jaydebeapi.DatabaseError as e: self.assertEquals(str(e), "java.sql.SQLException: expected") @@ -87,7 +87,7 @@ class MockTest(unittest.TestCase): self.conn.jconn.mockExceptionOnCommit("java.lang.RuntimeException", "expected") try: self.conn.commit() - fail("expected exception") + self.fail("expected exception") except jaydebeapi.InterfaceError as e: self.assertEquals(str(e), "java.lang.RuntimeException: expected") @@ -95,7 +95,7 @@ class MockTest(unittest.TestCase): self.conn.jconn.mockExceptionOnRollback("java.sql.SQLException", "expected") try: self.conn.rollback() - fail("expected exception") + self.fail("expected exception") except jaydebeapi.DatabaseError as e: self.assertEquals(str(e), "java.sql.SQLException: expected") @@ -103,6 +103,6 @@ class MockTest(unittest.TestCase): self.conn.jconn.mockExceptionOnRollback("java.lang.RuntimeException", "expected") try: self.conn.rollback() - fail("expected exception") + self.fail("expected exception") except jaydebeapi.InterfaceError as e: self.assertEquals(str(e), "java.lang.RuntimeException: expected")