[Zope-Checkins] CVS: Packages/DocumentTemplate/sequence/tests - framework.py:1.1.2.1 testSequence.py:1.3.2.1

Evan Simpson evan@cvs.zope.org
Mon, 6 Aug 2001 13:16:41 -0400


Update of /cvs-repository/Packages/DocumentTemplate/sequence/tests
In directory cvs.zope.org:/tmp/cvs-serv1419/DocumentTemplate/sequence/tests

Modified Files:
      Tag: Zope-2_4-branch
	testSequence.py 
Added Files:
      Tag: Zope-2_4-branch
	framework.py 
Log Message:
Added new unit test framework, changed several test suites to use it.


=== Added File Packages/DocumentTemplate/sequence/tests/framework.py ===


=== Packages/DocumentTemplate/sequence/tests/testSequence.py 1.3 => 1.3.2.1 ===
 ##############################################################################
 
-import sys
-sys.path.insert(0, '.')
-try:
-    import Testing
-except ImportError:
-    sys.path[0] = '../../'
-    import Testing
+import os, sys
+execfile(os.path.join(sys.path[0], 'framework.py'))
 
-import unittest
-sys.path.insert(0, '..')
 from SortEx import *
 from ztestlib import *
 from results import *
@@ -151,22 +144,4 @@
 
         assert res7==SortEx(wordlist, (("weight",), ("key", "myCmp", "desc")), md, mapping=1)
 
-
-def test_suite():
-    return unittest.makeSuite( TestCase )
-
-def debug():
-    return test_suite().debug()
-
-def pdebug():
-    import pdb
-    pdb.run('debug()')
-
-def main():
-    unittest.TextTestRunner().run( test_suite() )
-
-if __name__ == '__main__':
-   if len(sys.argv) > 1:
-      globals()[sys.argv[1]]()
-   else:
-      main()
+framework()