[cairo-commit] pycairo/test test.py,NONE,1.1 test.test,NONE,1.1
Steve Chaplin
commit at pdx.freedesktop.org
Sat Mar 12 02:28:20 PST 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/test
In directory gabe:/tmp/cvs-serv18578/test
Added Files:
test.py test.test
Log Message:
SC 2005/03/12
--- NEW FILE: test.py ---
#!/usr/bin/env python
import os
import doctest
import unittest
def _test():
# check we are running from the test dir
assert os.getcwd().endswith('/test'), "test.py must be run from the 'test' directory"
runner = unittest.TextTestRunner()
suite = doctest.DocFileSuite (__file__.replace ('.py', '.test'))
runner.run(suite)
if __name__ == "__main__":
_test()
--- NEW FILE: test.test ---
# doctest text file
# run non-gui example scripts, check they run and produce no output (error messages)
>>> import os
>>> os.chdir('../examples')
>>> files = [f for f in os.listdir('.') if f.endswith('.py')]
>>> for f in files:
... ret = os.system ('python %s' % f)
More information about the cairo-commit
mailing list