dabo Commit
Revision 2857
Date: 2007-02-28 15:31:54 -0800 (Wed, 28 Feb 2007)
Author: Nate

Changed:
A   trunk/tests/
A   trunk/tests/ModuleInitTemplate.py
A   trunk/tests/TestCaseTemplate.py
A   trunk/tests/biz/
A   trunk/tests/biz/__init__.py
A   trunk/tests/db/
A   trunk/tests/db/__init__.py
A   trunk/tests/lib/
A   trunk/tests/lib/__init__.py
A   trunk/tests/masterTestSuite.py
A   trunk/tests/ui/
A   trunk/tests/ui/UIwx/
A   trunk/tests/ui/UIwx/__init__.py
A   trunk/tests/ui/__init__.py

Log:
Set up the test harness for the unit test.  Everything is in working order.  I 
didn't copy over any of the existing tests yet.  I include 
ModuleInitTemplate.py and TestCaseTemplate.py to be used as template when 
people want to add a new test or test suite.  Let's keep these tests to only 
unit tests.

Diff:
Added: trunk/tests/ModuleInitTemplate.py
===================================================================
--- trunk/tests/ModuleInitTemplate.py                           (rev 0)
+++ trunk/tests/ModuleInitTemplate.py   2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,18 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/ModuleInitTemplate.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/TestCaseTemplate.py
===================================================================
--- trunk/tests/TestCaseTemplate.py                             (rev 0)
+++ trunk/tests/TestCaseTemplate.py     2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,23 @@
+"""Test Case description goes here.
+
+Rules for class functionality go here.
+
+Class Requirements for proper behavior go here.
+
+This file also provides the suite function.  The suite function will compile 
all of the test cases
+defined in this file and load them into a test suite.  The function then 
returns the test suite.
+
+If this file is run standalone, it will automatically run all of the test 
cases found in the file.
+"""
+
+import unittest
+
+class TestCaseSample(unittest.TestCase):
+       pass
+
+def suite():
+       classList = [TestCaseSample]
+       return unittest.TestSuite(classList)
+
+if __name__ == "__main__":
+       unittest.main()
\ No newline at end of file


Property changes on: trunk/tests/TestCaseTemplate.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/biz/__init__.py
===================================================================
--- trunk/tests/biz/__init__.py                         (rev 0)
+++ trunk/tests/biz/__init__.py 2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,18 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/biz/__init__.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/db/__init__.py
===================================================================
--- trunk/tests/db/__init__.py                          (rev 0)
+++ trunk/tests/db/__init__.py  2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,18 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/db/__init__.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/lib/__init__.py
===================================================================
--- trunk/tests/lib/__init__.py                         (rev 0)
+++ trunk/tests/lib/__init__.py 2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,18 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/lib/__init__.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/masterTestSuite.py
===================================================================
--- trunk/tests/masterTestSuite.py                              (rev 0)
+++ trunk/tests/masterTestSuite.py      2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,19 @@
+"""Master test control for the test suite.  Tests for all Tiers plus the lib 
section of Dabo are imported and run from here.
+
+This will import the DB, Biz, Lib, and UI Tiers for the test.  We will add the 
test files manually in the __init__.py files
+in each module.  The init files and every Test Case file must provide a 
function suite() which will return a unittest.TestSuite
+object that encompasses the all of the test cases and suite within that file 
or module.  See the sample init and testCase files
+for more information.
+"""
+
+import unittest
+
+import db
+import biz
+import lib
+import ui
+
+suiteList = [db.suite(), biz.suite(), lib.suite(), ui.suite()]
+
+allTiersTestSuite = unittest.TestSuite(suiteList)
+unittest.TextTestRunner(verbosity=2).run(allTiersTestSuite)
\ No newline at end of file


Property changes on: trunk/tests/masterTestSuite.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/ui/UIwx/__init__.py
===================================================================
--- trunk/tests/ui/UIwx/__init__.py                             (rev 0)
+++ trunk/tests/ui/UIwx/__init__.py     2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,18 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/ui/UIwx/__init__.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/ui/__init__.py
===================================================================
--- trunk/tests/ui/__init__.py                          (rev 0)
+++ trunk/tests/ui/__init__.py  2007-02-28 23:31:54 UTC (rev 2857)
@@ -0,0 +1,19 @@
+"""Provide an import for all of the files in the module.  Also provides a 
function called 
+suite which will return a TestSuite of everything in the module.
+"""
+
+import unittest
+
+#suiteList should contain all of the suite that are recieved from the modules 
and TestCases
+suiteList = []
+
+#import test module suites and add to list here
+import UIwx
+suiteList.append(UIwx.suite())
+
+#import TestCase suites and add to list here
+
+
+#setup a suite and return it
+def suite():
+    return unittest.TestSuite(suiteList)
\ No newline at end of file


Property changes on: trunk/tests/ui/__init__.py
___________________________________________________________________
Name: svn:executable
   + *




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to