(self, config=config1)
| 1621 | self.assert_log_lines([]) |
| 1622 | |
| 1623 | def test_config1_ok(self, config=config1): |
| 1624 | # A config file defining a sub-parser as well. |
| 1625 | with support.captured_stdout() as output: |
| 1626 | self.apply_config(config) |
| 1627 | logger = logging.getLogger("compiler.parser") |
| 1628 | # Both will output a message |
| 1629 | logger.info(self.next_message()) |
| 1630 | logger.error(self.next_message()) |
| 1631 | self.assert_log_lines([ |
| 1632 | ('INFO', '1'), |
| 1633 | ('ERROR', '2'), |
| 1634 | ], stream=output) |
| 1635 | # Original logger output is empty. |
| 1636 | self.assert_log_lines([]) |
| 1637 | |
| 1638 | def test_config2_failure(self): |
| 1639 | # A simple config file which overrides the default settings. |
no test coverage detected