Changeset 6237 for main/waeup.sirp/trunk/src/waeup/sirp/testing.py
- Timestamp:
- 30 May 2011, 01:04:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/testing.py
r5865 r6237 48 48 49 49 .. The following samples should go into Sphinx docs directly.... 50 50 51 51 Sample 52 52 ****** … … 54 54 Usage with plain Python testrunners 55 55 ----------------------------------- 56 56 57 57 Together with the :func:`setUpZope` and :func:`cleanUpZope` 58 58 functions we then can do unittests with all components registered … … 80 80 def setUp(self): 81 81 pass 82 82 83 83 def tearDown(self): 84 84 pass … … 98 98 99 99 .. note:: This works only with the default Python testrunners. 100 100 101 101 If you use the Zope testrunner (from :mod:`zope.testing`) 102 102 then you have to use appropriate layers like the … … 111 111 112 112 .. seealso:: :class:`waeup.sirp.testing.WAeUPSIRPUnitTestLayer` 113 113 114 114 """ 115 115 gsm = getGlobalSiteManager() … … 144 144 once before all these tests are run (and torn down once 145 145 afterwards). 146 146 147 147 To make use of this layer, you have to write a 148 148 :mod:`unittest.TestCase` class that provides an attribute called … … 151 151 import unittest 152 152 from waeup.sirp.testing import WAeUPSIRPUnitTestLayer 153 153 154 154 class MyTestCase(unittest.TestCase): 155 155
Note: See TracChangeset for help on using the changeset viewer.