[Zope-Checkins] SVN: Zope/trunk/src/ Some cleanup and provide an explicit test_suite function, the automatic discovery and ZopeTestCase don't seem to like each other
Hanno Schlichting
hannosch at hannosch.eu
Sun Jun 27 10:16:43 EDT 2010
Log message for revision 113941:
Some cleanup and provide an explicit test_suite function, the automatic discovery and ZopeTestCase don't seem to like each other
Changed:
U Zope/trunk/src/App/tests/test_setConfiguration.py
U Zope/trunk/src/Zope2/App/tests/testDoomedTransaction.py
U Zope/trunk/src/Zope2/App/tests/test_startup.py
-=-
Modified: Zope/trunk/src/App/tests/test_setConfiguration.py
===================================================================
--- Zope/trunk/src/App/tests/test_setConfiguration.py 2010-06-27 14:07:11 UTC (rev 113940)
+++ Zope/trunk/src/App/tests/test_setConfiguration.py 2010-06-27 14:16:42 UTC (rev 113941)
@@ -15,10 +15,6 @@
"""
import unittest
-import Testing
-#import Zope2
-#Zope2.startup()
-
from Testing.ZopeTestCase.layer import ZopeLite
@@ -109,6 +105,3 @@
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(SetConfigTests))
return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
Modified: Zope/trunk/src/Zope2/App/tests/testDoomedTransaction.py
===================================================================
--- Zope/trunk/src/Zope2/App/tests/testDoomedTransaction.py 2010-06-27 14:07:11 UTC (rev 113940)
+++ Zope/trunk/src/Zope2/App/tests/testDoomedTransaction.py 2010-06-27 14:16:42 UTC (rev 113941)
@@ -12,9 +12,7 @@
#
##############################################################################
-import sys
import unittest
-import logging
import transaction
class DoomedTransactionInManagerTest(unittest.TestCase):
@@ -33,11 +31,8 @@
trans = transaction.get()
trans.doom()
tm.commit()
-
+
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(DoomedTransactionInManagerTest))
return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
Modified: Zope/trunk/src/Zope2/App/tests/test_startup.py
===================================================================
--- Zope/trunk/src/Zope2/App/tests/test_startup.py 2010-06-27 14:07:11 UTC (rev 113940)
+++ Zope/trunk/src/Zope2/App/tests/test_startup.py 2010-06-27 14:16:42 UTC (rev 113941)
@@ -12,6 +12,7 @@
##############################################################################
import logging
+import unittest
from Testing.ZopeTestCase import ZopeTestCase
@@ -61,3 +62,9 @@
provideHandler(logevent, [IDatabaseOpened])
startup()
self.assertEqual(str(handler), logged)
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(StartupTests))
+ return suite
More information about the Zope-Checkins
mailing list