[cairo-commit] pycairo/test test.test,1.2,1.3
Steve Chaplin
commit at pdx.freedesktop.org
Fri Apr 29 02:11:18 PDT 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/test
In directory gabe:/tmp/cvs-serv22168/test
Modified Files:
test.test
Log Message:
SC
Index: test.test
===================================================================
RCS file: /cvs/cairo/pycairo/test/test.test,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test.test 7 Apr 2005 02:09:57 -0000 1.2
+++ test.test 29 Apr 2005 09:11:16 -0000 1.3
@@ -1,15 +1,21 @@
# doctest text file
->>> import os
+>>> import os, sys
>>> cwd = os.getcwd()
# run non-gui example scripts, check they run and produce no output (error messages)
+# and exit successfully
>>> os.chdir('%s/../examples' % cwd)
>>> files = [f for f in os.listdir('.') if f.endswith('.py')]
>>> for f in files:
-... ret = os.system ('python %s' % f)
+... ret = os.system ('python %s' % f) # return value is system dependent
+... if ret != 0 and sys.platform.startswith('linux'):
+... print 'Error:', f, 'returned', ret
# run png snippets
+>>> cmd = 'python snippets_png.py -s'
>>> os.chdir('%s/../examples/cairo_snippets' % cwd)
->>> ret = os.system ('python snippets_png.py -s')
+>>> ret = os.system (cmd)
+>>> if ret != 0 and sys.platform.startswith('linux'):
+... print 'Error:', cmd, 'returned', ret
More information about the cairo-commit
mailing list