(self)
| 1574 | logging.config.fileConfig(file, encoding="utf-8", **kwargs) |
| 1575 | |
| 1576 | def test_config0_ok(self): |
| 1577 | # A simple config file which overrides the default settings. |
| 1578 | with support.captured_stdout() as output: |
| 1579 | self.apply_config(self.config0) |
| 1580 | logger = logging.getLogger() |
| 1581 | # Won't output anything |
| 1582 | logger.info(self.next_message()) |
| 1583 | # Outputs a message |
| 1584 | logger.error(self.next_message()) |
| 1585 | self.assert_log_lines([ |
| 1586 | ('ERROR', '2'), |
| 1587 | ], stream=output) |
| 1588 | # Original logger output is empty. |
| 1589 | self.assert_log_lines([]) |
| 1590 | |
| 1591 | def test_config0_using_cp_ok(self): |
| 1592 | # A simple config file which overrides the default settings. |
nothing calls this directly
no test coverage detected