Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22134/tests/BugTracker/Tests

Modified Files:
        stream-document.SF-2804823.XQUERY.py 
Log Message:
propagated changes of Friday Jun 12 2009
from the May2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/06/12 - sjoerd:
        tests/BugTracker/Tests/stream-document.SF-2804823.XQUERY.py,1.1.2.2
Make test independent of whatever else is in the database.
Also, use a different way of calling subprocess.Popen so that we can
use quotes and dollars without having to do difficult
cross-architectural escaping.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: stream-document.SF-2804823.XQUERY.py
===================================================================
RCS file: 
/cvsroot/monetdb/pathfinder/tests/BugTracker/Tests/stream-document.SF-2804823.XQUERY.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- stream-document.SF-2804823.XQUERY.py        12 Jun 2009 07:56:54 -0000      
1.2
+++ stream-document.SF-2804823.XQUERY.py        12 Jun 2009 09:00:26 -0000      
1.3
@@ -7,7 +7,6 @@
 
 def client(cmd, input = None):
     clt = subprocess.Popen(cmd,
-                           shell = True,
                            stdin = subprocess.PIPE,
                            stdout = subprocess.PIPE,
                            stderr = subprocess.PIPE,
@@ -17,10 +16,10 @@
     sys.stderr.write(err)
 
 def main():
-    xq_client = os.getenv('XQUERY_CLIENT')
-    client('%s --input=my-document --collection=my-collection' % xq_client,
+    xq_client = os.getenv('XQUERY_CLIENT').split()
+    client(xq_client + ['--input=my-document', '--collection=my-collection'],
            '<document>test document</document>')
-    client('%s -s "pf:documents()"' % xq_client)
-    client('%s -s "pf:del-doc(\'my-document\')"' % xq_client)
+    client(xq_client + ['-s', 'for $doc in pf:documents() where $doc/@url = 
"my-document" return $doc'])
+    client(xq_client + ['-s', 'pf:del-doc("my-document")'])
 
 main()


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to