(self)
| 885 | self.assertEqual(set(cf['section2'].keys()), {'name22'}) |
| 886 | |
| 887 | def test_invalid_multiline_value(self): |
| 888 | if self.allow_no_value: |
| 889 | self.skipTest('if no_value is allowed, ParsingError is not raised') |
| 890 | |
| 891 | invalid = textwrap.dedent("""\ |
| 892 | [DEFAULT] |
| 893 | test {0} test |
| 894 | invalid""".format(self.delimiters[0]) |
| 895 | ) |
| 896 | cf = self.newconfig() |
| 897 | with self.assertRaises(configparser.ParsingError): |
| 898 | cf.read_string(invalid) |
| 899 | self.assertEqual(cf.get('DEFAULT', 'test'), 'test') |
| 900 | self.assertEqual(cf['DEFAULT']['test'], 'test') |
| 901 | |
| 902 | |
| 903 | class StrictTestCase(BasicTestCase, unittest.TestCase): |
nothing calls this directly
no test coverage detected