Changeset: 3b2b543898ef for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b2b543898ef
Modified Files:
testing/Mtest.py.in
testing/Mz.py.in
testing/sqltest.py
Branch: mtest
Log Message:
make monetdbe optional
diffs (63 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3693,6 +3693,14 @@ def main(argv) :
CONDITIONALS['HAVE_PYTHON_LZ4'] = False
else:
CONDITIONALS['HAVE_PYTHON_LZ4'] = True
+
+ try:
+ import monetdbe
+ except ImportError:
+ CONDITIONALS['HAVE_MONETDBE'] = False
+ else:
+ CONDITIONALS['HAVE_MONETDBE'] = True
+
if 'PYTHON3' in os.environ:
proc = process.Popen([os.environ['PYTHON3'], '-c', 'import scipy'],
stdout=process.PIPE, stderr=process.PIPE,
diff --git a/testing/Mz.py.in b/testing/Mz.py.in
--- a/testing/Mz.py.in
+++ b/testing/Mz.py.in
@@ -432,6 +432,7 @@ CONDITIONALS = {
'RELEASERUN' : "",
'BAD_HOSTNAME' : "",
'HAVE_IPV6' : "",
+ 'HAVE_MONETDBE' : "",
}
@@ -2521,6 +2522,14 @@ def main(argv) :
CONDITIONALS['HAVE_PYTHON_LZ4'] = False
else:
CONDITIONALS['HAVE_PYTHON_LZ4'] = True
+
+ try:
+ import monetdbe
+ except ImportError:
+ CONDITIONALS['HAVE_MONETDBE'] = False
+ else:
+ CONDITIONALS['HAVE_MONETDBE'] = True
+
if 'PYTHON3' in os.environ:
proc = process.Popen([os.environ['PYTHON3'], '-c', 'import scipy'],
stdout=process.PIPE, stderr=process.PIPE,
diff --git a/testing/sqltest.py b/testing/sqltest.py
--- a/testing/sqltest.py
+++ b/testing/sqltest.py
@@ -7,7 +7,6 @@ import os
import sys
import unittest
import pymonetdb
-import monetdbe
import difflib
from abc import ABCMeta, abstractmethod
import MonetDBtesting.process as process
@@ -527,6 +526,7 @@ class SQLTestCase():
if self._conn_ctx:
self.close()
if database == ':memory:':
+ import monetdbe
self.in_memory = True
# TODO add username, password, port when supported from monetdbe
self._conn_ctx = monetdbe.connect(':memory:', autocommit=True)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list