- Timestamp:
- 13 Sep 2011, 08:02:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/testing.py
r6658 r6727 24 24 """Get the keys of all logger defined globally. 25 25 """ 26 return logging.root.manager.loggerDict.keys() 26 result = logging.root.manager.loggerDict.keys() 27 print "\nLOGGERS: ", [x for x in result if 'waeup.sirp' in x] 28 return result 27 29 28 30 def remove_new_loggers(old_loggers): … … 248 250 ]) 249 251 252 old_loggers = [] 250 253 def setUp(test): 254 old_loggers = get_all_loggers() 251 255 FunctionalTestSetup().setUp() 252 256 253 257 def tearDown(test): 254 258 FunctionalTestSetup().tearDown() 259 remove_new_loggers(old_loggers) 255 260 256 261 def doctestsuite_for_module(dotted_path): … … 311 316 doctest.Example('', want), got, optionflags) 312 317 self.fail(diff) 318 319 class FunctionalTestSetup(FunctionalTestSetup): 320 """A replacement for the zope.app.testing class. 321 322 Removes also loggers. 323 """ 324 325 def setUp(self): 326 self.old_loggers = get_all_loggers() 327 super(FunctionalTestSetup, self).setUp() 328 return 329 330 def tearDown(self): 331 super(FunctionalTestSetup, self).tearDown() 332 remove_new_loggers(self.old_loggers) 333 return
Note: See TracChangeset for help on using the changeset viewer.