[Checkins] SVN: Zope/trunk/src/ Remove the ifmain blocks from tests

Hanno Schlichting hannosch at hannosch.eu
Sat Jul 31 16:44:08 EDT 2010


Log message for revision 115281:
  Remove the ifmain blocks from tests
  

Changed:
  U   Zope/trunk/src/App/tests/testManagement.py
  U   Zope/trunk/src/App/tests/testPersistentExtra.py
  U   Zope/trunk/src/App/tests/testUndo.py
  U   Zope/trunk/src/App/tests/test_class_init.py
  U   Zope/trunk/src/OFS/DefaultObservable.py
  U   Zope/trunk/src/OFS/tests/testAcquisition.py
  U   Zope/trunk/src/OFS/tests/testAppInitializer.py
  U   Zope/trunk/src/OFS/tests/testApplication.py
  U   Zope/trunk/src/OFS/tests/testCopySupport.py
  U   Zope/trunk/src/OFS/tests/testFTPInterface.py
  U   Zope/trunk/src/OFS/tests/testFileAndImage.py
  U   Zope/trunk/src/OFS/tests/testFindSupport.py
  U   Zope/trunk/src/OFS/tests/testFolder.py
  U   Zope/trunk/src/OFS/tests/testObjectManager.py
  U   Zope/trunk/src/OFS/tests/testOrderSupport.py
  U   Zope/trunk/src/OFS/tests/testOrderedFolder.py
  U   Zope/trunk/src/OFS/tests/testProperties.py
  U   Zope/trunk/src/OFS/tests/testRanges.py
  U   Zope/trunk/src/OFS/tests/testSimpleItem.py
  U   Zope/trunk/src/OFS/tests/testTraverse.py
  U   Zope/trunk/src/OFS/tests/test_DTMLDocument.py
  U   Zope/trunk/src/OFS/tests/test_DTMLMethod.py
  U   Zope/trunk/src/OFS/tests/test_Uninstalled.py
  U   Zope/trunk/src/OFS/tests/test_XMLExportImport.py
  U   Zope/trunk/src/Products/Five/component/tests.py
  U   Zope/trunk/src/Products/Five/viewlet/tests.py
  D   Zope/trunk/src/Products/PageTemplates/tests/run.py
  U   Zope/trunk/src/Products/PageTemplates/tests/testDTMLTests.py
  U   Zope/trunk/src/Products/PageTemplates/tests/testZRPythonExpr.py
  U   Zope/trunk/src/Products/PageTemplates/tests/testZopePageTemplate.py
  U   Zope/trunk/src/Products/PageTemplates/tests/test_ptfile.py
  U   Zope/trunk/src/Products/Sessions/stresstests/stresstestMultiThread.py
  U   Zope/trunk/src/Products/SiteErrorLog/tests/testSiteErrorLog.py
  U   Zope/trunk/src/Products/ZReST/tests/test_ZReST.py
  U   Zope/trunk/src/Shared/DC/xml/ppml.py
  U   Zope/trunk/src/Shared/DC/xml/xyap.py
  U   Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/FunctionalDocTest.txt
  U   Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/ZopeDocTest.txt
  U   Zope/trunk/src/Testing/common.py
  U   Zope/trunk/src/Testing/tests/test_makerequest.py
  U   Zope/trunk/src/ZPublisher/tests/testBaseRequest.py
  U   Zope/trunk/src/ZPublisher/tests/testHTTPRangeSupport.py
  U   Zope/trunk/src/ZPublisher/tests/testHTTPRequest.py
  U   Zope/trunk/src/ZPublisher/tests/testIterators.py
  U   Zope/trunk/src/ZPublisher/tests/testPostTraversal.py
  U   Zope/trunk/src/ZPublisher/tests/test_Converters.py
  U   Zope/trunk/src/ZPublisher/tests/test_exception_handling.py
  U   Zope/trunk/src/ZPublisher/tests/test_xmlrpc.py
  U   Zope/trunk/src/ZServer/tests/test_clockserver.py
  U   Zope/trunk/src/ZServer/tests/test_config.py
  U   Zope/trunk/src/ZServer/tests/test_responses.py
  D   Zope/trunk/src/ZTUtils/tests/run.py
  U   Zope/trunk/src/ZTUtils/tests/testBatch.py
  U   Zope/trunk/src/ZTUtils/tests/testTree.py
  U   Zope/trunk/src/ZTUtils/tests/testZope.py
  U   Zope/trunk/src/Zope2/App/tests/testExceptionHook.py
  U   Zope/trunk/src/Zope2/Startup/tests/testStarter.py
  U   Zope/trunk/src/Zope2/Startup/tests/test_schema.py
  U   Zope/trunk/src/Zope2/Startup/tests/test_warnfilter.py
  U   Zope/trunk/src/webdav/tests/testCollection.py
  U   Zope/trunk/src/webdav/tests/testEtagSupport.py
  U   Zope/trunk/src/webdav/tests/testLockItem.py
  U   Zope/trunk/src/webdav/tests/testLockable.py
  U   Zope/trunk/src/webdav/tests/testNullResource.py
  U   Zope/trunk/src/webdav/tests/testPUT_factory.py
  U   Zope/trunk/src/webdav/tests/testResource.py
  U   Zope/trunk/src/webdav/tests/test_davcmds.py
  U   Zope/trunk/src/webdav/tests/test_xmltools.py

-=-
Modified: Zope/trunk/src/App/tests/testManagement.py
===================================================================
--- Zope/trunk/src/App/tests/testManagement.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/App/tests/testManagement.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestNavigation),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/App/tests/testPersistentExtra.py
===================================================================
--- Zope/trunk/src/App/tests/testPersistentExtra.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/App/tests/testPersistentExtra.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -17,6 +17,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestPersistent),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/App/tests/testUndo.py
===================================================================
--- Zope/trunk/src/App/tests/testUndo.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/App/tests/testUndo.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestUndoSupport),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/App/tests/test_class_init.py
===================================================================
--- Zope/trunk/src/App/tests/test_class_init.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/App/tests/test_class_init.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -38,6 +38,3 @@
     return unittest.TestSuite((
         DocTestSuite(),
         ))
-
-if __name__ == '__main__':
-    unittest.main()

Modified: Zope/trunk/src/OFS/DefaultObservable.py
===================================================================
--- Zope/trunk/src/OFS/DefaultObservable.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/DefaultObservable.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -105,101 +105,3 @@
                 self._observers.remove( bozo )
             except:
                 pass
-
-
-#
-#   Unit tests
-#
-
-if __name__ == '__main__':
-
-    class DontGoHere( Exception ): pass
-
-    class Idawanna( Exception ): pass
-
-    class TestSubject( DefaultObservable ):
-
-        def __init__( self, paths ):
-            DefaultObservable.__init__( self, 0 )
-            self.paths = paths
-
-        def restrictedTraverse( self, path, default ):
-            return self.paths.get( path, default )
-
-    callbacks = {}
-
-    def recordCallback( name, subject, event ):
-        cbrec = callbacks.get( name, None )
-        if cbrec is None:
-            cbrec = callbacks[ name ] = []
-        cbrec.append( ( subject, event ) )
-
-
-    class TestObserver:
-
-        def __call__( self, subject, event ):
-            recordCallback( 'direct', subject, event )
-
-        def namedCallback( self, subject, event ):
-            recordCallback( 'named', subject, event )
-
-        def named2Callback( self, subject, event ):
-            recordCallback( 'named2', subject, event )
-
-        def boundCallback( self, subject, event ):
-            recordCallback( 'bound', subject, event )
-
-    def freefuncObserver( subject, event ):
-        recordCallback( 'freefunc', subject, event )
-
-    def tryVeto( subject, event ):
-        """ Simulate attempted veto. """
-        raise Idawanna
-
-    observer = TestObserver()
-
-    # Simulate Zope's path traversal mechanism.
-    paths = {}
-    paths[ 'direct'         ] = observer
-    paths[ 'direct/named'   ] = observer.namedCallback
-    paths[ 'direct/named2'  ] = observer.named2Callback
-    paths[ 'bound'          ] = observer.boundCallback
-    paths[ 'freefunc'       ] = freefuncObserver
-    paths[ 'tryVeto'        ] = tryVeto
-
-    subject = TestSubject( paths )
-
-    subject.registerObserver( 'direct' )
-    subject.registerObserver( 'bound' )
-    subject.registerObserver( 'direct/named' )
-    subject.registerObserver( ( 'direct', 'named2' ) )
-    subject.registerObserver( 'freefunc' )
-    subject.registerObserver( 'tryVeto' )
-
-    try:
-        subject.registerObserver( 'nonesuch' )
-        raise DontGoHere( 'path not found' )
-    except NameError:
-        pass
-    except:
-        import traceback
-        traceback.print_exc()
-
-    try:
-        subject.registerObserver( 3.1415926 )
-        raise DontGoHere( 'non-path' )
-    except TypeError:
-        pass
-    except:
-        import traceback
-        traceback.print_exc()
-
-    subject.notify( 'First event' )
-
-    subject.unregisterObserver( 'bound' )
-    subject.notify( { 'name' : 'Second event', 'value' : 42 } )
-
-    for key in callbacks.keys():
-        print '[%s]' % key
-        for cb in callbacks[ key ]:
-            print '    %s' % `cb`

Modified: Zope/trunk/src/OFS/tests/testAcquisition.py
===================================================================
--- Zope/trunk/src/OFS/tests/testAcquisition.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testAcquisition.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -246,7 +246,3 @@
     suite.addTest(unittest.makeSuite(TestGetAttr_c))
     suite.addTest(unittest.makeSuite(TestGetAttrAnonymous_c))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/OFS/tests/testAppInitializer.py
===================================================================
--- Zope/trunk/src/OFS/tests/testAppInitializer.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testAppInitializer.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -219,9 +219,3 @@
     suite = unittest.TestSuite()
     suite.addTest( unittest.makeSuite( TestInitialization ) )
     return suite
-
-def main():
-    unittest.main(defaultTest='test_suite')
-
-if __name__ == '__main__':
-    main()

Modified: Zope/trunk/src/OFS/tests/testApplication.py
===================================================================
--- Zope/trunk/src/OFS/tests/testApplication.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testApplication.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -109,6 +109,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(ApplicationTests),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testCopySupport.py
===================================================================
--- Zope/trunk/src/OFS/tests/testCopySupport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testCopySupport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,5 +1,4 @@
 import unittest
-import Testing
 
 import cStringIO
 
@@ -526,6 +525,3 @@
     suite.addTest( unittest.makeSuite( TestCopySupport ) )
     suite.addTest( unittest.makeSuite( TestCopySupportSecurity ) )
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testFTPInterface.py
===================================================================
--- Zope/trunk/src/OFS/tests/testFTPInterface.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testFTPInterface.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestFTPInterface),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testFileAndImage.py
===================================================================
--- Zope/trunk/src/OFS/tests/testFileAndImage.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testFileAndImage.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -358,7 +358,3 @@
         unittest.makeSuite(FileTests),
         unittest.makeSuite(ImageTests),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/OFS/tests/testFindSupport.py
===================================================================
--- Zope/trunk/src/OFS/tests/testFindSupport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testFindSupport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestFindSupport),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testFolder.py
===================================================================
--- Zope/trunk/src/OFS/tests/testFolder.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testFolder.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -17,6 +17,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestFolder),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testObjectManager.py
===================================================================
--- Zope/trunk/src/OFS/tests/testObjectManager.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testObjectManager.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -461,6 +461,3 @@
     suite = unittest.TestSuite()
     suite.addTest( unittest.makeSuite( ObjectManagerTests ) )
     return suite
-
-if __name__ == "__main__":
-    unittest.main()

Modified: Zope/trunk/src/OFS/tests/testOrderSupport.py
===================================================================
--- Zope/trunk/src/OFS/tests/testOrderSupport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testOrderSupport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -170,6 +170,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestOrderSupport),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testOrderedFolder.py
===================================================================
--- Zope/trunk/src/OFS/tests/testOrderedFolder.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testOrderedFolder.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -19,6 +19,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestOrderedFolder),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testProperties.py
===================================================================
--- Zope/trunk/src/OFS/tests/testProperties.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testProperties.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -160,6 +160,3 @@
         unittest.makeSuite(TestPropertyManager),
         unittest.makeSuite(TestPropertySheet),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testRanges.py
===================================================================
--- Zope/trunk/src/OFS/tests/testRanges.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testRanges.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -358,9 +358,3 @@
     suite = unittest.TestSuite()
     suite.addTest( unittest.makeSuite( TestRequestRange ) )
     return suite
-
-def main():
-    unittest.TextTestRunner().run(test_suite())
-
-if __name__ == '__main__':
-    main()

Modified: Zope/trunk/src/OFS/tests/testSimpleItem.py
===================================================================
--- Zope/trunk/src/OFS/tests/testSimpleItem.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testSimpleItem.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -120,6 +120,3 @@
         unittest.makeSuite(TestItem_w__name__),
         unittest.makeSuite(TestSimpleItem),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/testTraverse.py
===================================================================
--- Zope/trunk/src/OFS/tests/testTraverse.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/testTraverse.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -422,11 +422,6 @@
             self.folder1.unrestrictedTraverse('+something') is 'plus')
 
 
-import os, sys
-if __name__ == '__main__':
-    execfile(os.path.join(sys.path[0], 'framework.py'))
-
-
 class SimpleClass(object):
     """Class with no __bobo_traverse__."""
 
@@ -685,6 +680,3 @@
     from Testing.ZopeTestCase import FunctionalDocTestSuite
     suite.addTest( FunctionalDocTestSuite() )
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/test_DTMLDocument.py
===================================================================
--- Zope/trunk/src/OFS/tests/test_DTMLDocument.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/test_DTMLDocument.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -42,6 +42,3 @@
         unittest.makeSuite(DTMLDocumentTests),
         unittest.makeSuite(FactoryTests),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/test_DTMLMethod.py
===================================================================
--- Zope/trunk/src/OFS/tests/test_DTMLMethod.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/test_DTMLMethod.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -52,6 +52,3 @@
         unittest.makeSuite(DTMLMethodTests),
         unittest.makeSuite(FactoryTests),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/OFS/tests/test_Uninstalled.py
===================================================================
--- Zope/trunk/src/OFS/tests/test_Uninstalled.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/test_Uninstalled.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -151,6 +151,3 @@
 
 def main():
     unittest.main(defaultTest='test_suite')
-
-if __name__ == '__main__':
-    main()

Modified: Zope/trunk/src/OFS/tests/test_XMLExportImport.py
===================================================================
--- Zope/trunk/src/OFS/tests/test_XMLExportImport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/OFS/tests/test_XMLExportImport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -194,6 +194,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(XMLExportImportTests),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/Products/Five/component/tests.py
===================================================================
--- Zope/trunk/src/Products/Five/component/tests.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/Five/component/tests.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -18,7 +18,6 @@
 from doctest import DocFileSuite
 from Testing.ZopeTestCase import FunctionalDocFileSuite
 
-__docformat__ = "reStructuredText"
 
 def test_suite():
     return unittest.TestSuite([
@@ -26,6 +25,3 @@
         FunctionalDocFileSuite('makesite.txt',
                                package="Products.Five.component"),
         ])
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/Products/Five/viewlet/tests.py
===================================================================
--- Zope/trunk/src/Products/Five/viewlet/tests.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/Five/viewlet/tests.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -79,6 +79,3 @@
         FunctionalDocFileSuite('README.txt'),
         FunctionalDocFileSuite('directives.txt'),
         ])
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Deleted: Zope/trunk/src/Products/PageTemplates/tests/run.py
===================================================================
--- Zope/trunk/src/Products/PageTemplates/tests/run.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/PageTemplates/tests/run.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-"""Run all tests."""
-
-import unittest
-
-def test_suite():
-    suite = unittest.TestSuite()
-    for mname in ('DTMLTests', 'HTMLTests', 'Expressions', 'TALES'):
-        m = __import__('test' + mname)
-        suite.addTest(m.test_suite())
-    return suite
-
-if __name__ == "__main__":
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/Products/PageTemplates/tests/testDTMLTests.py
===================================================================
--- Zope/trunk/src/Products/PageTemplates/tests/testDTMLTests.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/PageTemplates/tests/testDTMLTests.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -188,6 +188,3 @@
 
 def test_suite():
     return unittest.makeSuite(DTMLTests, 'check')
-
-if __name__=='__main__':
-    main()

Modified: Zope/trunk/src/Products/PageTemplates/tests/testZRPythonExpr.py
===================================================================
--- Zope/trunk/src/Products/PageTemplates/tests/testZRPythonExpr.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/PageTemplates/tests/testZRPythonExpr.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -54,7 +54,3 @@
  
 def test_suite():
     return unittest.makeSuite(MiscTests)
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/Products/PageTemplates/tests/testZopePageTemplate.py
===================================================================
--- Zope/trunk/src/Products/PageTemplates/tests/testZopePageTemplate.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/PageTemplates/tests/testZopePageTemplate.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -502,7 +502,3 @@
     suite.addTests(unittest.makeSuite(ZPTUnicodeEncodingConflictResolution))
     suite.addTests(unittest.makeSuite(PreferredCharsetUnicodeResolverTests))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/Products/PageTemplates/tests/test_ptfile.py
===================================================================
--- Zope/trunk/src/Products/PageTemplates/tests/test_ptfile.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/PageTemplates/tests/test_ptfile.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -215,6 +215,3 @@
         unittest.makeSuite(LineEndingsTestCase),
         unittest.makeSuite(LazyLoadingTestCase),
     ))
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/Products/Sessions/stresstests/stresstestMultiThread.py
===================================================================
--- Zope/trunk/src/Products/Sessions/stresstests/stresstestMultiThread.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/Sessions/stresstests/stresstestMultiThread.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -10,39 +10,26 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-import sys, os, time
-if __name__ == "__main__":
-    sys.path.insert(0, '../../..')
-    #os.chdir('../../..')
+import time
+
 from Testing import makerequest
 import ZODB # in order to get Persistence.Persistent working
 import transaction
 import Acquisition
-from Acquisition import aq_base
 from Products.Sessions.BrowserIdManager import BrowserIdManager, \
      getNewBrowserId
 from Products.Sessions.SessionDataManager import \
-    SessionDataManager, SessionDataManagerErr
+    SessionDataManager
 from Products.Transience.Transience import \
-    TransientObjectContainer, TransientObject
+    TransientObjectContainer
 from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
-from Products.TemporaryFolder.LowConflictConnection import \
-     LowConflictConnection
-from ZODB.Connection import Connection
-from ZODB.POSException import InvalidObjectReference, ConflictError, \
+from ZODB.POSException import ConflictError, \
      ReadConflictError, BTreesConflictError
-from DateTime import DateTime
-from unittest import TestCase, TestSuite, TextTestRunner, makeSuite
-import time, threading, random
-from cPickle import UnpickleableError
+from unittest import TestCase, TestSuite, makeSuite
+import threading, random
 from ZODB.DemoStorage import DemoStorage
-from tempstorage.TemporaryStorage import TemporaryStorage
 from OFS.Application import Application
-from OFS.Folder import Folder
-import sys
-import time
 import traceback
-sys.setcheckinterval(200)
 
 from Products.Transience.tests import fauxtime
 import Products.Transience.Transience
@@ -261,7 +248,3 @@
     test_multithread = makeSuite(TestMultiThread, 'test')
     suite = TestSuite((test_multithread,))
     return suite
-
-if __name__ == '__main__':
-    runner = TextTestRunner(verbosity=9, descriptions=9)
-    runner.run(test_suite())

Modified: Zope/trunk/src/Products/SiteErrorLog/tests/testSiteErrorLog.py
===================================================================
--- Zope/trunk/src/Products/SiteErrorLog/tests/testSiteErrorLog.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/SiteErrorLog/tests/testSiteErrorLog.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -152,7 +152,3 @@
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(SiteErrorLogTests))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/Products/ZReST/tests/test_ZReST.py
===================================================================
--- Zope/trunk/src/Products/ZReST/tests/test_ZReST.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Products/ZReST/tests/test_ZReST.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -145,6 +145,3 @@
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(TestZReST))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultSuite='test_suite')

Modified: Zope/trunk/src/Shared/DC/xml/ppml.py
===================================================================
--- Zope/trunk/src/Shared/DC/xml/ppml.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Shared/DC/xml/ppml.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -595,102 +595,3 @@
         'persistent': save_persis,
         'unicode': save_unicode,
         }
-
-
-# The rest is used for testing only
-
-class C:
-    def __cmp__(self, other):
-        return cmp(self.__dict__, other.__dict__)
-
-def test():
-    import xmllib
-    import pickle
-    c = C()
-    c.foo = 1
-    c.bar = 2
-    x = [0, 1, 2, 3]
-    y = ('abc', 'abc', c, c)
-    x.append(y)
-    x.append(y)
-    t = ()
-    l = []
-    s = ''
-    L = long('999999999999')
-    x.append(t)
-    x.append(l)
-    x.append(s)
-    x.append(L)
-    x.append(55555)
-    x.append(13)
-    r = [x]
-    print x
-    f = pickle.dumps(x)
-    print f
-    r.append(f)
-    q = ToXMLloads(f)
-    q = str(q)
-    q = '<?xml version="1.0"?>\n' + q
-    print q
-    r.append(q)
-    F = xmlPickler()
-    F.binary = 1
-    p = xmllib.XMLParser()
-    p.start_handlers = F.start_handlers
-    p.end_handlers = F.end_handlers
-    p.handle_data = F.handle_data
-    p.unknown_starttag = F.unknown_starttag
-    p.unknown_endtag = F.unknown_endtag
-    p._stack = F._stack
-    p.push = F.push
-    p.append = F.append
-    data = q.split('\n')
-    for l in data:
-        p.feed(l)
-    p.close()
-    z = p._stack
-    z = z[0][0]
-    print z, '\n'
-    r.append(z)
-    l = pickle.loads(z)
-    print l, '\n'
-    r.append(l)
-
-def test1():
-    import xml.parsers.expat
-    import pickle
-    c = C()
-    c.foo = 1
-    c.bar = 2
-    x = [0, 1, 2, 3]
-    y = ('abc', 'abc', c, c)
-    x.append(y)
-    x.append(y)
-    t = ()
-    l = []
-    s = ''
-    L = long('999999999999')
-    x.append(t)
-    x.append(l)
-    x.append(s)
-    x.append(L)
-    x.append(5)
-    x.append(13)
-    print x, '\n'
-    f = pickle.dumps(x)
-    print f, '\n'
-    q = ToXMLloads(f)
-    q = str(q)
-    q = '<?xml version="1.0"?>\n' + q
-    print q, '\n'
-    F = xmlPickler()
-    F.binary = 0
-    p = xml.parsers.expat.ParserCreate()
-    p.CharacterDataHandler = F.handle_data
-    p.StartElementHandler = F.unknown_starttag
-    p.EndElementHandler = F.unknown_endtag
-    r = p.Parse(q)
-    print r, '\n'
-
-if __name__ == '__main__':
-    test()

Modified: Zope/trunk/src/Shared/DC/xml/xyap.py
===================================================================
--- Zope/trunk/src/Shared/DC/xml/xyap.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Shared/DC/xml/xyap.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -22,9 +22,7 @@
 import string
 import xml.parsers.expat
 
-from pickle import *
 
-
 class xyap:
     start_handlers = {}
     end_handlers = {}
@@ -117,57 +115,3 @@
         'array': lambda self, tag, data: data[2],
         'data': lambda self, tag, data: data[2:],
         }
-
-def test():
-
-    data = """<?xml version="1.0"?>
-    <methodCall>
-             <methodName>examples.getStateName
-             </methodName>
-             <params>
-                <param>
-                   <value><i4>41</i4></value>
-                   </param>
-
-                <param><value>
-                <struct>
-             <member>
-                <name>lowerBound</name>
-                <value><i4>18</i4></value>
-                </member>
-             <member>
-                <name>upperBound</name>
-                <value><i4>139</i4></value>
-                </member>
-             </struct></value>
-                   </param>
-
-                <param><value>
-             <array>
-             <data>
-                <value><i4>12</i4></value>
-                <value><string>Egypt</string></value>
-                <value><boolean>0</boolean></value>
-                <value><i4>-31</i4></value>
-                </data>
-             </array></value>
-                   </param>
-
-                </params>
-             </methodCall>
-             """
-
-    data = data.split('\n')
-    r = []
-    for C in XYap, xmlrpc:
-        p = C()
-        for l in data:
-            p.feed(l)
-        p.close()
-        r.append(p._stack)
-
-    return r
-
-
-if __name__=='__main__':
-    print test()

Modified: Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/FunctionalDocTest.txt
===================================================================
--- Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/FunctionalDocTest.txt	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/FunctionalDocTest.txt	2010-07-31 20:44:07 UTC (rev 115281)
@@ -56,10 +56,6 @@
    ``FunctionalDocFileSuite`` and instantiate it, passing the name of the
    text file containing the test.  For example:
 
-   import os, sys
-   if __name__ == '__main__':
-       execfile(os.path.join(sys.path[0], 'framework.py'))
-
    from unittest import TestSuite
    from Testing.ZopeTestCase import FunctionalDocFileSuite
 
@@ -68,10 +64,7 @@
            FunctionalDocFileSuite('FunctionalDocTest.txt'),
        ))
 
-   if __name__ == '__main__':
-       framework()
 
-
 Examples
 --------
 

Modified: Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/ZopeDocTest.txt
===================================================================
--- Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/ZopeDocTest.txt	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/ZopeDocTest.txt	2010-07-31 20:44:07 UTC (rev 115281)
@@ -26,10 +26,6 @@
    passing the name of the text file containing the tests.
    For example:
 
-   import os, sys
-   if __name__ == '__main__':
-       execfile(os.path.join(sys.path[0], 'framework.py'))
-
    from unittest import TestSuite
    from Testing.ZopeTestCase import ZopeDocFileSuite
 
@@ -38,10 +34,7 @@
            ZopeDocFileSuite('ZopeDocTest.txt'),
        ))
 
-   if __name__ == '__main__':
-       framework()
 
-
 Examples
 --------
 

Modified: Zope/trunk/src/Testing/common.py
===================================================================
--- Zope/trunk/src/Testing/common.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Testing/common.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -2,14 +2,6 @@
 import unittest
 TestRunner = unittest.TextTestRunner
 
-def framework():
-    if __name__ != '__main__':
-        return
-    if len(sys.argv) > 1:
-        errs = globals()[sys.argv[1]]()
-    else:
-        errs = TestRunner().run(test_suite())
-    sys.exit(errs and 1 or 0)
 
 def debug():
     test_suite().debug()
@@ -41,8 +33,3 @@
         return 'Dummy(%s)' % `self.__dict__`
 
     __repr__ = __str__
-
-
-def Testing_file(*args):
-    dir = os.path.split(Testing.__file__)[0]
-    return apply(os.path.join, (dir,) + args)

Modified: Zope/trunk/src/Testing/tests/test_makerequest.py
===================================================================
--- Zope/trunk/src/Testing/tests/test_makerequest.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Testing/tests/test_makerequest.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -62,6 +62,3 @@
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(MakerequestTests))
     return suite
-
-if __name__=='__main__':
-    unittest.TextTestRunner().run(test_suite())

Modified: Zope/trunk/src/ZPublisher/tests/testBaseRequest.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testBaseRequest.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/testBaseRequest.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -705,6 +705,3 @@
         unittest.makeSuite(TestBaseRequest),
         unittest.makeSuite(TestBaseRequestZope3Views),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZPublisher/tests/testHTTPRangeSupport.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testHTTPRangeSupport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/testHTTPRangeSupport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -136,9 +136,3 @@
 def pdebug():
     import pdb
     pdb.run('debug()')
-
-if __name__=='__main__':
-    if len(sys.argv) > 1:
-        globals()[sys.argv[1]]()
-    else:
-        main()

Modified: Zope/trunk/src/ZPublisher/tests/testHTTPRequest.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testHTTPRequest.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/testHTTPRequest.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1068,6 +1068,3 @@
     suite.addTest(unittest.makeSuite(RecordTests))
     suite.addTest(unittest.makeSuite(HTTPRequestTests))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZPublisher/tests/testIterators.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testIterators.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/testIterators.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -10,9 +10,3 @@
     suite = unittest.TestSuite()
     suite.addTest( unittest.makeSuite( TestFileStreamIterator ) )
     return suite
-
-def main():
-    unittest.main(defaultTest='test_suite')
-
-if __name__ == '__main__':
-    main()

Modified: Zope/trunk/src/ZPublisher/tests/testPostTraversal.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testPostTraversal.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/testPostTraversal.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -137,6 +137,3 @@
 
 def test_suite():
     return TestSuite( ( makeSuite(TestBaseRequestPT), ) )
-
-if __name__ == '__main__':
-    main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZPublisher/tests/test_Converters.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/test_Converters.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/test_Converters.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -110,9 +110,5 @@
         self.assertEqual(field2ulines(to_convert), to_convert.splitlines())
 
 
-
 def test_suite():
     return unittest.TestSuite((unittest.makeSuite(ConvertersTests),))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZPublisher/tests/test_exception_handling.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/test_exception_handling.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/test_exception_handling.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -45,6 +45,3 @@
                    'ExceptionRaiser2': ExceptionRaiser2,
                    'ExceptionRaiser3': ExceptionRaiser3,}),
         ])
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZPublisher/tests/test_xmlrpc.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/test_xmlrpc.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZPublisher/tests/test_xmlrpc.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -212,6 +212,3 @@
 
 def test_suite():
     return unittest.TestSuite((unittest.makeSuite(XMLRPCResponseTests),))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZServer/tests/test_clockserver.py
===================================================================
--- Zope/trunk/src/ZServer/tests/test_clockserver.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZServer/tests/test_clockserver.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,9 +1,9 @@
 import unittest
 import time
-from StringIO import StringIO
 
 from ZServer import ClockServer
 
+
 class DummyLogger:
     def __init__(self):
         self.L = []
@@ -14,6 +14,7 @@
     def read(self):
         return ' '.join(self.L)
 
+
 class LogHelperTests(unittest.TestCase):
     def _getTargetClass(self):
         return ClockServer.LogHelper
@@ -22,13 +23,13 @@
         return self._getTargetClass()(*arg, **kw)
 
     def test_helper(self):
-        from StringIO import StringIO
         logger = DummyLogger()
         helper = self._makeOne(logger)
         self.assertEqual(helper.logger, logger)
         logger.log('ip', 'msg', foo=1, bar=2)
         self.assertEqual(logger.read(), 'ip msg')
 
+
 class ClockServerTests(unittest.TestCase):
     def _getTargetClass(self):
         return ClockServer.ClockServer
@@ -151,6 +152,3 @@
     suite = unittest.makeSuite(ClockServerTests)
     suite.addTest(unittest.makeSuite(LogHelperTests))
     return suite
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/ZServer/tests/test_config.py
===================================================================
--- Zope/trunk/src/ZServer/tests/test_config.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZServer/tests/test_config.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -293,6 +293,3 @@
     suite = unittest.makeSuite(ZServerConfigurationTestCase)
     suite.addTest(unittest.makeSuite(MonitorServerConfigurationTestCase))
     return suite
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/ZServer/tests/test_responses.py
===================================================================
--- Zope/trunk/src/ZServer/tests/test_responses.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZServer/tests/test_responses.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -308,6 +308,3 @@
         unittest.makeSuite(ZServerHTTPResponseEventsTestCase)
     ))
     return suite
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Deleted: Zope/trunk/src/ZTUtils/tests/run.py
===================================================================
--- Zope/trunk/src/ZTUtils/tests/run.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZTUtils/tests/run.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-"""Run all tests."""
-
-import unittest
-import glob
-import os
-import sys
-
-def test_suite():
-    suite = unittest.TestSuite()
-    for mname in glob.glob(os.path.join(sys.path[0], 'test*.py')):
-        mname = os.path.split(mname)[1][:-3]
-        m = __import__(mname)
-        suite.addTest(m.test_suite())
-    return suite
-
-if __name__ == "__main__":
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/ZTUtils/tests/testBatch.py
===================================================================
--- Zope/trunk/src/ZTUtils/tests/testBatch.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZTUtils/tests/testBatch.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,8 +1,5 @@
-import os, sys
+from unittest import TestCase, makeSuite
 
-from unittest import TestCase, makeSuite, main
-
-import string
 from ZTUtils import Batch
 
 class BatchTests(TestCase):
@@ -50,6 +47,3 @@
     
 def test_suite():
     return makeSuite(BatchTests)
-
-if __name__=='__main__':
-    main()

Modified: Zope/trunk/src/ZTUtils/tests/testTree.py
===================================================================
--- Zope/trunk/src/ZTUtils/tests/testTree.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZTUtils/tests/testTree.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -214,7 +214,7 @@
     
     def testDecodeDecompressedSizeLimit(self):
         import zlib
-        from ZTUtils.Tree import b2a, a2b, encodeExpansion, decodeExpansion
+        from ZTUtils.Tree import b2a
         big = b2a(zlib.compress('x' * (1024*1100)))
         self.assert_(len(big) < 8192) # Must be under the input size limit
         self.assertRaises(ValueError, Tree.decodeExpansion, ':' + big)
@@ -222,6 +222,3 @@
 
 def test_suite():
     return unittest.makeSuite(TreeTests)
-
-if __name__=='__main__':
-    unittest.main()

Modified: Zope/trunk/src/ZTUtils/tests/testZope.py
===================================================================
--- Zope/trunk/src/ZTUtils/tests/testZope.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/ZTUtils/tests/testZope.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -1,8 +1,5 @@
-import os, sys
+from unittest import TestCase, makeSuite
 
-from unittest import TestCase, makeSuite, main
-
-import string
 import urllib
 from ZTUtils.Zope import make_query, complex_marshal
 from ZTUtils.Zope import make_hidden_input
@@ -66,6 +63,3 @@
 
 def test_suite():
     return makeSuite(QueryTests)
-
-if __name__=='__main__':
-    main()

Modified: Zope/trunk/src/Zope2/App/tests/testExceptionHook.py
===================================================================
--- Zope/trunk/src/Zope2/App/tests/testExceptionHook.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Zope2/App/tests/testExceptionHook.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -411,6 +411,3 @@
     suite.addTest(unittest.makeSuite(ExceptionMessageRenderTest))
     suite.addTest(unittest.makeSuite(ExceptionViewsTest))
     return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/Zope2/Startup/tests/testStarter.py
===================================================================
--- Zope/trunk/src/Zope2/Startup/tests/testStarter.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Zope2/Startup/tests/testStarter.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -397,6 +397,3 @@
 
 def test_suite():
     return unittest.makeSuite(ZopeStarterTestCase)
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/Zope2/Startup/tests/test_schema.py
===================================================================
--- Zope/trunk/src/Zope2/Startup/tests/test_schema.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Zope2/Startup/tests/test_schema.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -223,6 +223,3 @@
 
 def test_suite():
     return unittest.makeSuite(StartupTestCase)
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/Zope2/Startup/tests/test_warnfilter.py
===================================================================
--- Zope/trunk/src/Zope2/Startup/tests/test_warnfilter.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/Zope2/Startup/tests/test_warnfilter.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -125,6 +125,3 @@
 
 def test_suite():
     return unittest.makeSuite(TestWarnFilter)
-
-if __name__ == "__main__":
-    unittest.main(defaultTest="test_suite")

Modified: Zope/trunk/src/webdav/tests/testCollection.py
===================================================================
--- Zope/trunk/src/webdav/tests/testCollection.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testCollection.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestCollection),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testEtagSupport.py
===================================================================
--- Zope/trunk/src/webdav/tests/testEtagSupport.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testEtagSupport.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -15,6 +15,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestEtagSupport),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testLockItem.py
===================================================================
--- Zope/trunk/src/webdav/tests/testLockItem.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testLockItem.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -14,6 +14,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestLockItem),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testLockable.py
===================================================================
--- Zope/trunk/src/webdav/tests/testLockable.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testLockable.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -34,6 +34,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestUtilFunctions),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testNullResource.py
===================================================================
--- Zope/trunk/src/webdav/tests/testNullResource.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testNullResource.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -81,6 +81,3 @@
         unittest.makeSuite(TestLockNullResource),
         unittest.makeSuite(TestNullResource),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testPUT_factory.py
===================================================================
--- Zope/trunk/src/webdav/tests/testPUT_factory.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testPUT_factory.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -90,6 +90,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestPUTFactory),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/testResource.py
===================================================================
--- Zope/trunk/src/webdav/tests/testResource.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/testResource.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -282,6 +282,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestResource),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: Zope/trunk/src/webdav/tests/test_davcmds.py
===================================================================
--- Zope/trunk/src/webdav/tests/test_davcmds.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/test_davcmds.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -84,7 +84,3 @@
         unittest.makeSuite(TestUnlock),
         unittest.makeSuite(TestPropPatch),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
-

Modified: Zope/trunk/src/webdav/tests/test_xmltools.py
===================================================================
--- Zope/trunk/src/webdav/tests/test_xmltools.py	2010-07-31 19:17:25 UTC (rev 115280)
+++ Zope/trunk/src/webdav/tests/test_xmltools.py	2010-07-31 20:44:07 UTC (rev 115281)
@@ -31,6 +31,3 @@
     return unittest.TestSuite((
         unittest.makeSuite(TestNode),
         ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')



More information about the checkins mailing list