(self)
| 1588 | logging.config.fileConfig(file, encoding="utf-8", **kwargs) |
| 1589 | |
| 1590 | def test_config0_ok(self): |
| 1591 | # A simple config file which overrides the default settings. |
| 1592 | with support.captured_stdout() as output: |
| 1593 | self.apply_config(self.config0) |
| 1594 | logger = logging.getLogger() |
| 1595 | # Won't output anything |
| 1596 | logger.info(self.next_message()) |
| 1597 | # Outputs a message |
| 1598 | logger.error(self.next_message()) |
| 1599 | self.assert_log_lines([ |
| 1600 | ('ERROR', '2'), |
| 1601 | ], stream=output) |
| 1602 | # Original logger output is empty. |
| 1603 | self.assert_log_lines([]) |
| 1604 | |
| 1605 | def test_config0_using_cp_ok(self): |
| 1606 | # A simple config file which overrides the default settings. |
nothing calls this directly
no test coverage detected