Changeset 9988 for main/waeup.kofa/trunk/src/waeup/kofa/utils/tests
- Timestamp:
- 24 Feb 2013, 13:42:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_logger.py
r9283 r9988 162 162 self.assertEqual(len(result.handlers), 1) 163 163 handler = result.handlers[0] 164 #self.assertEqual(handler.maxBytes, MAX_BYTES) 165 self.assertEqual(handler.backupCount, BACKUP_COUNT) 164 if hasattr(handler, 'maxBytes'): 165 self.assertEqual(handler.maxBytes, MAX_BYTES) 166 if hasattr(handler, 'backupCount'): 167 self.assertEqual(handler.backupCount, BACKUP_COUNT) 166 168 self.assertTrue(result.propagate is False) 167 169 return … … 209 211 self.assertEqual(new_handler_num, 1) 210 212 self.assertTrue(isinstance( 211 212 logging.handlers.RotatingFileHandler))213 new_py_logger.handlers[0], 214 logging.handlers.WatchedFileHandler)) 213 215 214 216 class LoggersFunctionalTests(FunctionalTestCase): … … 254 256 handler = self.component.logger.handlers[0] 255 257 self.assertTrue(isinstance( 256 handler, logging.handlers.RotatingFileHandler)) 257 #self.assertEqual(handler.maxBytes, MAX_BYTES) 258 self.assertEqual(handler.backupCount, BACKUP_COUNT) 258 handler, logging.handlers.WatchedFileHandler)) 259 if hasattr(handler, 'maxBytes'): 260 self.assertEqual(handler.maxBytes, MAX_BYTES) 261 if hasattr(handler, 'backupCount'): 262 self.assertEqual(handler.backupCount, BACKUP_COUNT) 259 263 self.assertTrue(handler.baseFilename.endswith('logs/sample.log')) 260 264 return
Note: See TracChangeset for help on using the changeset viewer.