Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21051
Modified Files:
Tag: May2009
stream-document.SF-2804823.XQUERY.py
Log Message:
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.
U stream-document.SF-2804823.XQUERY.py
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.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- stream-document.SF-2804823.XQUERY.py 11 Jun 2009 13:18:30 -0000
1.1.2.1
+++ stream-document.SF-2804823.XQUERY.py 12 Jun 2009 08:47:01 -0000
1.1.2.2
@@ -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