Changeset: 2750dd19f10f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2750dd19f10f
Added Files:
        sql/test/mapi/Tests/python2_dbapi.SQL.bat
        sql/test/mapi/Tests/python2_dbapi.SQL.sh
        sql/test/mapi/Tests/python2_dbapi.stable.err
        sql/test/mapi/Tests/python2_dbapi.stable.out
        sql/test/mapi/Tests/python3_dbapi.SQL.bat
        sql/test/mapi/Tests/python3_dbapi.SQL.sh
        sql/test/mapi/Tests/python3_dbapi.stable.err
        sql/test/mapi/Tests/python3_dbapi.stable.out
Removed Files:
        sql/test/mapi/Tests/python_dbapi.SQL.bat
        sql/test/mapi/Tests/python_dbapi.SQL.sh
        sql/test/mapi/Tests/python_dbapi.stable.err
        sql/test/mapi/Tests/python_dbapi.stable.out
Modified Files:
        sql/test/mapi/Tests/All
Branch: Oct2012
Log Message:

python_dbapi: make Python2 and Python3 tests


diffs (138 lines):

diff --git a/sql/test/mapi/Tests/All b/sql/test/mapi/Tests/All
--- a/sql/test/mapi/Tests/All
+++ b/sql/test/mapi/Tests/All
@@ -6,7 +6,8 @@ sample4
 smack00
 smack01
 HAVE_PERL?perl_dbi
-HAVE_PYTHON?python_dbapi
+HAVE_PYTHON2?python2_dbapi
+HAVE_PYTHON3?python3_dbapi
 HAVE_GEOM&HAVE_PHP?php_monetdb
 !HAVE_GEOM&HAVE_PHP?php_monetdb_nogeom
 utf8test
diff --git a/sql/test/mapi/Tests/python_dbapi.SQL.bat 
b/sql/test/mapi/Tests/python2_dbapi.SQL.bat
rename from sql/test/mapi/Tests/python_dbapi.SQL.bat
rename to sql/test/mapi/Tests/python2_dbapi.SQL.bat
--- a/sql/test/mapi/Tests/python_dbapi.SQL.bat
+++ b/sql/test/mapi/Tests/python2_dbapi.SQL.bat
@@ -3,4 +3,11 @@
 prompt # $t $g  
 echo on
 
-sqlsample.py %MAPIPORT% %TSTDB%
+rem must be aligned with the installation directory chosen in
+rem clients/examples/python
+set testpath=%TSTSRCBASE%\..\clients\examples\python
+rem ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
+rem Python that runs Mtest (currently always Python 2)
+set PYTHONPATH=%PYTHON2PATH%
+
+%PYTHON2% "%testpath%/sqlsample.py" %MAPIPORT% %TSTDB%
diff --git a/sql/test/mapi/Tests/python_dbapi.SQL.sh 
b/sql/test/mapi/Tests/python2_dbapi.SQL.sh
rename from sql/test/mapi/Tests/python_dbapi.SQL.sh
rename to sql/test/mapi/Tests/python2_dbapi.SQL.sh
--- a/sql/test/mapi/Tests/python_dbapi.SQL.sh
+++ b/sql/test/mapi/Tests/python2_dbapi.SQL.sh
@@ -1,3 +1,11 @@
 #!/bin/sh
 
-Mlog -x "sqlsample.py $MAPIPORT $TSTDB"
+# must be aligned with the installation directory chosen in
+# clients/examples/python
+testpath="$TSTSRCBASE/../clients/examples/python"
+# ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
+# Python that runs Mtest (currently always Python 2)
+PYTHONPATH=${PYTHON2PATH}
+export PYTHONPATH
+
+Mlog -x "${PYTHON2} ${testpath}/sqlsample.py $MAPIPORT $TSTDB"
diff --git a/sql/test/mapi/Tests/python_dbapi.stable.err 
b/sql/test/mapi/Tests/python2_dbapi.stable.err
rename from sql/test/mapi/Tests/python_dbapi.stable.err
rename to sql/test/mapi/Tests/python2_dbapi.stable.err
--- a/sql/test/mapi/Tests/python_dbapi.stable.err
+++ b/sql/test/mapi/Tests/python2_dbapi.stable.err
@@ -1,4 +1,4 @@
-stderr of test 'python_dbapi` in directory 'test/mapi` itself:
+stderr of test 'python2_dbapi` in directory 'test/mapi` itself:
 
 
 # 22:24:36 >  
diff --git a/sql/test/mapi/Tests/python_dbapi.stable.out 
b/sql/test/mapi/Tests/python2_dbapi.stable.out
rename from sql/test/mapi/Tests/python_dbapi.stable.out
rename to sql/test/mapi/Tests/python2_dbapi.stable.out
--- a/sql/test/mapi/Tests/python_dbapi.stable.out
+++ b/sql/test/mapi/Tests/python2_dbapi.stable.out
@@ -1,4 +1,4 @@
-stdout of test 'python_dbapi` in directory 'test/mapi` itself:
+stdout of test 'python2_dbapi` in directory 'test/mapi` itself:
 
 
 # 20:08:06 >  
diff --git a/sql/test/mapi/Tests/python_dbapi.SQL.bat 
b/sql/test/mapi/Tests/python3_dbapi.SQL.bat
copy from sql/test/mapi/Tests/python_dbapi.SQL.bat
copy to sql/test/mapi/Tests/python3_dbapi.SQL.bat
--- a/sql/test/mapi/Tests/python_dbapi.SQL.bat
+++ b/sql/test/mapi/Tests/python3_dbapi.SQL.bat
@@ -3,4 +3,11 @@
 prompt # $t $g  
 echo on
 
-sqlsample.py %MAPIPORT% %TSTDB%
+rem must be aligned with the installation directory chosen in
+rem clients/examples/python
+set testpath=%TSTSRCBASE%\..\clients\examples\python
+rem ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
+rem Python that runs Mtest (currently always Python 2)
+set PYTHONPATH=%PYTHON3PATH%
+
+%PYTHON3% "%testpath%/sqlsample.py" %MAPIPORT% %TSTDB%
diff --git a/sql/test/mapi/Tests/python_dbapi.SQL.sh 
b/sql/test/mapi/Tests/python3_dbapi.SQL.sh
copy from sql/test/mapi/Tests/python_dbapi.SQL.sh
copy to sql/test/mapi/Tests/python3_dbapi.SQL.sh
--- a/sql/test/mapi/Tests/python_dbapi.SQL.sh
+++ b/sql/test/mapi/Tests/python3_dbapi.SQL.sh
@@ -1,3 +1,11 @@
 #!/bin/sh
 
-Mlog -x "sqlsample.py $MAPIPORT $TSTDB"
+# must be aligned with the installation directory chosen in
+# clients/examples/python
+testpath="$TSTSRCBASE/../clients/examples/python"
+# ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
+# Python that runs Mtest (currently always Python 2)
+PYTHONPATH=${PYTHON3PATH}
+export PYTHONPATH
+
+Mlog -x "${PYTHON3} ${testpath}/sqlsample.py $MAPIPORT $TSTDB"
diff --git a/sql/test/mapi/Tests/python_dbapi.stable.err 
b/sql/test/mapi/Tests/python3_dbapi.stable.err
copy from sql/test/mapi/Tests/python_dbapi.stable.err
copy to sql/test/mapi/Tests/python3_dbapi.stable.err
--- a/sql/test/mapi/Tests/python_dbapi.stable.err
+++ b/sql/test/mapi/Tests/python3_dbapi.stable.err
@@ -1,4 +1,4 @@
-stderr of test 'python_dbapi` in directory 'test/mapi` itself:
+stderr of test 'python3_dbapi` in directory 'test/mapi` itself:
 
 
 # 22:24:36 >  
diff --git a/sql/test/mapi/Tests/python_dbapi.stable.out 
b/sql/test/mapi/Tests/python3_dbapi.stable.out
copy from sql/test/mapi/Tests/python_dbapi.stable.out
copy to sql/test/mapi/Tests/python3_dbapi.stable.out
--- a/sql/test/mapi/Tests/python_dbapi.stable.out
+++ b/sql/test/mapi/Tests/python3_dbapi.stable.out
@@ -1,4 +1,4 @@
-stdout of test 'python_dbapi` in directory 'test/mapi` itself:
+stdout of test 'python3_dbapi` in directory 'test/mapi` itself:
 
 
 # 20:08:06 >  
@@ -33,7 +33,7 @@ Ready.
 (2,)
 42000!syntax error, unexpected IDENT, expecting SELECT or '(' in: "( xyz"
 
-[(3, u'three'), (7, u'seven')]
+[(3, 'three'), (7, 'seven')]
 2
 
 # 22:24:36 >  
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to