Update of /cvsroot/monetdb/sql/src/test/Views/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20774/src/test/Views/Tests

Modified Files:
      Tag: Nov2009
        Views.SQL.py 
Log Message:
New module MonetDBtesting.process to make it easier to write tests in Python.

U Views.SQL.py
Index: Views.SQL.py
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/Views/Tests/Views.SQL.py,v
retrieving revision 1.5.8.2
retrieving revision 1.5.8.3
diff -u -d -r1.5.8.2 -r1.5.8.3
--- Views.SQL.py        14 Oct 2009 12:04:58 -0000      1.5.8.2
+++ Views.SQL.py        15 Oct 2009 15:50:56 -0000      1.5.8.3
@@ -1,18 +1,16 @@
 import os, sys
-import subprocess
-
+from MonetDBtesting import process
 
-def client(cmd, infile):
-    clt = subprocess.Popen(cmd, shell=True, universal_newlines=True, 
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    out, err = clt.communicate(open(infile).read())
+def client(lang, infile):
+    clt = process.client(lang, stdin=open(infile), stdout=process.PIPE, 
stderr=process.PIPE)
+    out, err = clt.communicate()
     sys.stdout.write(out)
     sys.stderr.write(err)
 
-
 def main():
-    clcmd = os.getenv('SQL_CLIENT')
     sys.stdout.write('Views Restrictions\n')
-    client(clcmd, os.path.join(os.getenv('RELSRCDIR'), '..', 
'views_restrictions.sql'))
+    client('sql', os.path.join(os.getenv('RELSRCDIR'), '..',
+                               'views_restrictions.sql'))
     sys.stdout.write('step 1\n')
     sys.stdout.write('Cleanup\n')
     sys.stdout.write('step2\n')


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to