Changeset: 26b53e490ad2 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26b53e490ad2 Modified Files: python/monetdb/mapi2.py python/test/run.sh python/test/runtests.py Branch: default Log Message:
made testing easier to do diffs (69 lines): diff -r b7a0f4c4d523 -r 26b53e490ad2 python/monetdb/mapi2.py --- a/python/monetdb/mapi2.py Sat May 22 13:18:05 2010 +0200 +++ b/python/monetdb/mapi2.py Sat May 22 13:55:52 2010 +0200 @@ -109,8 +109,8 @@ elif prompt.startswith(MSG_REDIRECT): # a redirect can contain multiple redirects, for now we only use # the first - response = prompt.split()[0][1:].split(':') - if response[1] == "merovingian": + redirect = prompt.split()[0][1:].split(':') + if redirect[1] == "merovingian": logger.debug("II: merovingian proxy, restarting " + "authenticatiton") if iteration <= 10: @@ -119,9 +119,9 @@ raise OperationalError("maximal number of redirects " + "reached (10)") - elif response[1] == "monetdb": - self.hostname = response[2][2:] - self.port, self.database = response[3].split('/') + elif redirect[1] == "monetdb": + self.hostname = redirect[2][2:] + self.port, self.database = redirect[3].split('/') self.port = int(self.port) logger.info("II: merovingian redirect to monetdb://%s:%s/%s" % (self.hostname, self.port, self.database)) diff -r b7a0f4c4d523 -r 26b53e490ad2 python/test/run.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/test/run.sh Sat May 22 13:55:52 2010 +0200 @@ -0,0 +1,11 @@ +#!/bin/bash + +export TSTDB="demo" +export TSTHOSTNAME="localhost" +export TSTUSERNAME="monetdb" +export TSTPASSWORD="monetdb" +export TSTDEBUG="no" + +python2 ./runtests.py +python3 ./runtests.py + diff -r b7a0f4c4d523 -r 26b53e490ad2 python/test/runtests.py --- a/python/test/runtests.py Sat May 22 13:18:05 2010 +0200 +++ b/python/test/runtests.py Sat May 22 13:55:52 2010 +0200 @@ -21,10 +21,7 @@ import warnings import sys import os - -#import logging -#logging.basicConfig(level=logging.DEBUG) -#logger = logging.getLogger('monetdb') +import logging import capabilities import dbapi20 @@ -47,7 +44,10 @@ TSTHOSTNAME = os.environ.get('TSTHOSTNAME', 'localhost') TSTUSERNAME = os.environ.get('TSTUSERNAME', 'monetdb') TSTPASSWORD = os.environ.get('TSTPASSWORD', 'monetdb') - + +if os.environ.get("TSTDEBUG", "no") == "yes": + logging.basicConfig(level=logging.DEBUG) + logger = logging.getLogger('monetdb') class TextTestRunnerNoTime(unittest.TextTestRunner): """A test runner class that displays results in textual form, but without time """ _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list