Make `normand.ParseError` contain a list of messages
[normand.git] / tests / conftest.py
index c5d41793f67392555ef0b7fb7ab5b3d3f1e95fd9..0c90e2a6c8b3e7a57f4136ef0e06127f7d567a53 100644 (file)
@@ -77,10 +77,14 @@ class _NormandTestItemFail(_NormandTestItem):
             normand.parse(normand_text)
 
         exc = exc_info.value
-        expected_msg = "{}:{} - {}".format(
-            exc.text_loc.line_no, exc.text_loc.col_no, str(exc)
-        )
-        assert output.strip() == expected_msg
+        expected_msg = ''
+
+        for msg in reversed(exc.messages):
+            expected_msg += "{}:{} - {}\n".format(
+                msg.text_location.line_no, msg.text_location.col_no, msg.text
+            )
+
+        assert output.strip() == expected_msg.strip()
 
 
 class _NormandTestItemPass(_NormandTestItem):
This page took 0.022978 seconds and 4 git commands to generate.