(self)
| 1336 | self.assertEqual(parser.getLineNumber(), 1) |
| 1337 | |
| 1338 | def test_sax_parse_exception_str(self): |
| 1339 | # pass various values from a locator to the SAXParseException to |
| 1340 | # make sure that the __str__() doesn't fall apart when None is |
| 1341 | # passed instead of an integer line and column number |
| 1342 | # |
| 1343 | # use "normal" values for the locator: |
| 1344 | str(SAXParseException("message", None, |
| 1345 | self.DummyLocator(1, 1))) |
| 1346 | # use None for the line number: |
| 1347 | str(SAXParseException("message", None, |
| 1348 | self.DummyLocator(None, 1))) |
| 1349 | # use None for the column number: |
| 1350 | str(SAXParseException("message", None, |
| 1351 | self.DummyLocator(1, None))) |
| 1352 | # use None for both: |
| 1353 | str(SAXParseException("message", None, |
| 1354 | self.DummyLocator(None, None))) |
| 1355 | |
| 1356 | class DummyLocator: |
| 1357 | def __init__(self, lineno, colno): |
nothing calls this directly
no test coverage detected