[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate/sequence/tests - __init__.py:1.1.2.1 testSequence.py:1.4.20.1 framework.py:NONE
Tres Seaver
tseaver@zope.com
Mon, 15 Oct 2001 15:27:41 -0400
Update of /cvs-repository/Zope/lib/python/DocumentTemplate/sequence/tests
In directory cvs.zope.org:/tmp/cvs-serv31130/sequence/tests
Modified Files:
Tag: tseaver-utxfixup-branch
testSequence.py
Added Files:
Tag: tseaver-utxfixup-branch
__init__.py
Removed Files:
Tag: tseaver-utxfixup-branch
framework.py
Log Message:
- Remove dependency on 'execfile( "framework.py" )'.
=== Added File Zope/lib/python/DocumentTemplate/sequence/tests/__init__.py ===
# make this a package.
=== Zope/lib/python/DocumentTemplate/sequence/tests/testSequence.py 1.4 => 1.4.20.1 ===
##############################################################################
-import os, sys
-execfile(os.path.join(sys.path[0], 'framework.py'))
+import os, sys, unittest
-from SortEx import *
-from ztestlib import *
-from results import *
+from DocumentTemplate.sequence.SortEx import *
+from DocumentTemplate.sequence.tests.ztestlib import *
+from DocumentTemplate.sequence.tests.results import *
class TestCase( unittest.TestCase ):
@@ -142,6 +141,21 @@
#... and push out function onto the namespace
md._push({"myCmp" : myCmp})
- assert res7==SortEx(wordlist, (("weight",), ("key", "myCmp", "desc")), md, mapping=1)
+ assert res7==SortEx( wordlist
+ , ( ("weight",)
+ , ("key", "myCmp", "desc")
+ )
+ , md
+ , mapping=1
+ )
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest( unittest.makeSuite( TestCase ) )
+ return suite
-framework()
+def main():
+ unittest.TextTestRunner().run(test_suite())
+
+if __name__ == '__main__':
+ main()
=== Removed File Zope/lib/python/DocumentTemplate/sequence/tests/framework.py ===