(self)
| 5625 | logging.basicConfig(filename=None, filemode='a') |
| 5626 | |
| 5627 | def test_handlers(self): |
| 5628 | handlers = [ |
| 5629 | logging.StreamHandler(), |
| 5630 | logging.StreamHandler(sys.stdout), |
| 5631 | logging.StreamHandler(), |
| 5632 | ] |
| 5633 | f = logging.Formatter() |
| 5634 | handlers[2].setFormatter(f) |
| 5635 | logging.basicConfig(handlers=handlers) |
| 5636 | self.assertIs(handlers[0], logging.root.handlers[0]) |
| 5637 | self.assertIs(handlers[1], logging.root.handlers[1]) |
| 5638 | self.assertIs(handlers[2], logging.root.handlers[2]) |
| 5639 | self.assertIsNotNone(handlers[0].formatter) |
| 5640 | self.assertIsNotNone(handlers[1].formatter) |
| 5641 | self.assertIs(handlers[2].formatter, f) |
| 5642 | self.assertIs(handlers[0].formatter, handlers[1].formatter) |
| 5643 | |
| 5644 | def test_force(self): |
| 5645 | old_string_io = io.StringIO() |
nothing calls this directly
no test coverage detected