(self)
| 5528 | logging.basicConfig(filename=None, filemode='a') |
| 5529 | |
| 5530 | def test_handlers(self): |
| 5531 | handlers = [ |
| 5532 | logging.StreamHandler(), |
| 5533 | logging.StreamHandler(sys.stdout), |
| 5534 | logging.StreamHandler(), |
| 5535 | ] |
| 5536 | f = logging.Formatter() |
| 5537 | handlers[2].setFormatter(f) |
| 5538 | logging.basicConfig(handlers=handlers) |
| 5539 | self.assertIs(handlers[0], logging.root.handlers[0]) |
| 5540 | self.assertIs(handlers[1], logging.root.handlers[1]) |
| 5541 | self.assertIs(handlers[2], logging.root.handlers[2]) |
| 5542 | self.assertIsNotNone(handlers[0].formatter) |
| 5543 | self.assertIsNotNone(handlers[1].formatter) |
| 5544 | self.assertIs(handlers[2].formatter, f) |
| 5545 | self.assertIs(handlers[0].formatter, handlers[1].formatter) |
| 5546 | |
| 5547 | def test_force(self): |
| 5548 | old_string_io = io.StringIO() |
nothing calls this directly
no test coverage detected