Revision: 178
http://fclient.svn.sourceforge.net/fclient/?rev=178&view=rev
Author: jurner
Date: 2008-02-08 00:39:39 -0800 (Fri, 08 Feb 2008)
Log Message:
-----------
add a test all script
Added Paths:
-----------
trunk/sandbox/fcp/test_fcp/test_all.py
Added: trunk/sandbox/fcp/test_fcp/test_all.py
===================================================================
--- trunk/sandbox/fcp/test_fcp/test_all.py (rev 0)
+++ trunk/sandbox/fcp/test_fcp/test_all.py 2008-02-08 08:39:39 UTC (rev 178)
@@ -0,0 +1,27 @@
+"""Runs all unittests in the current folder"""
+
+import os, sys
+import unittest
+#*************************************************************************************************
+#
+#*************************************************************************************************
+if __name__ == '__main__':
+ Dir, SelfName= os.path.split(os.path.abspath(__file__))
+ sys.path.insert(0, Dir)
+
+ for file in os.walk(Dir).next()[2]:
+ filename, ext = os.path.splitext(file)
+ if ext.lower() == '.py':
+ if filename.startswith('test_') and file != SelfName:
+ mod = __import__(filename)
+ suite = getattr(mod, 'suite')
+ unittest.TextTestRunner(verbosity=1).run(suite())
+
+
+
+
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|