From 5c0255d9016f5f4dc43043cfb46c2b6c1a23bce2 Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 26 Jan 2011 13:42:02 +0100 Subject: [PATCH] Recpmfogired tests to run against JayDeBeApi. Ran against pysqlite accidently. --- README_development.rst | 6 ++++++ src/test/integration_test.py | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README_development.rst b/README_development.rst index 39cdf23..a72ff8e 100644 --- a/README_development.rst +++ b/README_development.rst @@ -15,6 +15,12 @@ Build a new release 2. Do your changes. +3. Assert the right connect method is configured for tests. + +4. Run test suite. :: + + $ nosetests + 3. Add a changelog entry to ``README.rst``. 4. Increase version in ``setup.py``. diff --git a/src/test/integration_test.py b/src/test/integration_test.py index 96b943a..353be01 100644 --- a/src/test/integration_test.py +++ b/src/test/integration_test.py @@ -68,11 +68,15 @@ class IntegrationTest(TestCase): jpype.attachThreadToJVM() def connect(self): + # rename the latter connect method to run tests against + # pysqlite + msg = "Warinng: Your are not running the tests against JayDeBeApi." + print >> sys.stderr, msg import sqlite3 return sqlite3.connect(':memory:') - def connect_(self): - jar_names = [ 'hsqldb.jar', 'sqlitejdbc-v056.jar', 'sqlite.jar' ] + def connect(self): + jar_names = [ 'sqlitejdbc-v056.jar', 'hsqldb.jar', 'sqlite.jar' ] jars = [ path.join(jar_dir, i) for i in jar_names ] if is_jython(): sys.path.extend(jars) @@ -93,7 +97,7 @@ class IntegrationTest(TestCase): # conn = jaydebeapi.connect('SQLite.JDBCDriver', # 'jdbc:sqlite:/:memory:') return conn - + def setUp(self): self.conn = self.connect() self.sql_file(create_sql)