- for file_name, result in self.KNOWN_RESULTS:
- self.assertEqual(dcparser.parse(test_file_path(file_name)).to_dict(), result)
+ for dir_name, file_name, result in self.KNOWN_RESULTS:
+ self.assertEqual(dcparser.parse(test_file_path(dir_name, file_name)).to_dict(), result)
+
+
+class TestParserErrors(unittest.TestCase):
+
+ def test_error(self):
+ try:
+ html.transform(test_file_path('erroneous', 'asnyk_miedzy_nami.xml'),
+ test_file_path('erroneous', 'asnyk_miedzy_nami.html'))
+ self.fail()
+ except etree.XMLSyntaxError, e:
+ import ipdb; ipdb.set_trace()
+
+ self.assertEqual(e.position, (25, 13))