(self)
| 1373 | self.assertEqual(parser.getLineNumber(), 1) |
| 1374 | |
| 1375 | def test_sax_parse_exception_str(self): |
| 1376 | # pass various values from a locator to the SAXParseException to |
| 1377 | # make sure that the __str__() doesn't fall apart when None is |
| 1378 | # passed instead of an integer line and column number |
| 1379 | # |
| 1380 | # use "normal" values for the locator: |
| 1381 | str(SAXParseException("message", None, |
| 1382 | self.DummyLocator(1, 1))) |
| 1383 | # use None for the line number: |
| 1384 | str(SAXParseException("message", None, |
| 1385 | self.DummyLocator(None, 1))) |
| 1386 | # use None for the column number: |
| 1387 | str(SAXParseException("message", None, |
| 1388 | self.DummyLocator(1, None))) |
| 1389 | # use None for both: |
| 1390 | str(SAXParseException("message", None, |
| 1391 | self.DummyLocator(None, None))) |
| 1392 | |
| 1393 | class DummyLocator: |
| 1394 | def __init__(self, lineno, colno): |
nothing calls this directly
no test coverage detected