Changeset: bc0649f0cef8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc0649f0cef8
Modified Files:
clients/python/test/runtests.py
clients/python3/test/runtests.py
Branch: default
Log Message:
can run tests from source folder again
diffs (79 lines):
diff --git a/clients/python/test/runtests.py b/clients/python/test/runtests.py
--- a/clients/python/test/runtests.py
+++ b/clients/python/test/runtests.py
@@ -23,6 +23,17 @@ import sys
import os
import logging
+try:
+ import monetdb.sql
+except ImportError:
+ logging.warning("monetdb python API not found, using local monetdb python
API")
+ import sys
+ import os
+ here = os.path.dirname(__file__)
+ parent = os.path.join(here, os.pardir)
+ sys.path.append(parent)
+ import monetdb.sql
+
import capabilities
import dbapi20
@@ -38,17 +49,6 @@ if os.environ.get("TSTDEBUG", "no") == "
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('monetdb')
-try:
- import monetdb.sql
-except ImportError:
- logging.warning("monetdb python API not found, using local monetdb python
API")
- import sys
- import os
- here = os.path.dirname(__file__)
- parent = os.path.join(here, os.pardir)
- sys.path.append(parent)
- import monetdb.sql
-
class TextTestRunnerNoTime(unittest.TextTestRunner):
"""A test runner class that displays results in textual form, but without
time """
diff --git a/clients/python3/test/runtests.py b/clients/python3/test/runtests.py
--- a/clients/python3/test/runtests.py
+++ b/clients/python3/test/runtests.py
@@ -23,6 +23,17 @@ import sys
import os
import logging
+try:
+ import monetdb.sql
+except ImportError:
+ logging.warning("monetdb python API not found, using local monetdb python
API")
+ import sys
+ import os
+ here = os.path.dirname(__file__)
+ parent = os.path.join(here, os.pardir)
+ sys.path.append(parent)
+ import monetdb.sql
+
import capabilities
import dbapi20
@@ -38,18 +49,6 @@ if os.environ.get("TSTDEBUG", "no") == "
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('monetdb')
-try:
- import monetdb.sql
-except ImportError:
- logging.warning("monetdb python API not found, using local monetdb python
API")
- import sys
- import os
- here = os.path.dirname(__file__)
- parent = os.path.join(here, os.pardir)
- sys.path.append(parent)
- import monetdb.sql
-
-
class TextTestRunnerNoTime(unittest.TextTestRunner):
"""A test runner class that displays results in textual form, but without
time """
def run(self, test):
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list