(self)
| 2227 | self.assertEqual(output.getvalue(), 'a = 1\n\n') |
| 2228 | |
| 2229 | def test_disabled_error(self): |
| 2230 | with self.assertRaises(configparser.MissingSectionHeaderError): |
| 2231 | configparser.ConfigParser().read_string("a = 1") |
| 2232 | |
| 2233 | with self.assertRaises(configparser.UnnamedSectionDisabledError): |
| 2234 | configparser.ConfigParser().add_section(configparser.UNNAMED_SECTION) |
| 2235 | |
| 2236 | with self.assertRaises(configparser.UnnamedSectionDisabledError): |
| 2237 | configparser.ConfigParser()[configparser.UNNAMED_SECTION] = {'a': '1'} |
| 2238 | |
| 2239 | def test_multiple_configs(self): |
| 2240 | cfg = configparser.ConfigParser(allow_unnamed_section=True) |
nothing calls this directly
no test coverage detected