Changeset: 24d925c2c925 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/24d925c2c925
Modified Files:
        sql/test/Tests/load_with_offset.test
        testing/utils.py
Branch: Jan2022
Log Message:

Error message depends on version of bison.


diffs (34 lines):

diff --git a/sql/test/Tests/load_with_offset.test 
b/sql/test/Tests/load_with_offset.test
--- a/sql/test/Tests/load_with_offset.test
+++ b/sql/test/Tests/load_with_offset.test
@@ -136,7 +136,7 @@ NULL
 a
 b
 
-statement error 42000!syntax error in: "copy 9 records into my_test from stdin 
using delimiters '|',E'\n' null as '' no"
+statement error 42000!
 COPY 9 RECORDS INTO my_test FROM stdin USING DELIMITERS '|',E'\n' NULL as '' 
NO CONSTRAINT
 <COPY_INTO_DATA>
 
diff --git a/testing/utils.py b/testing/utils.py
--- a/testing/utils.py
+++ b/testing/utils.py
@@ -9,16 +9,14 @@ def parse_mapi_err_msg(error:str=''):
     """
     err_code = None
     err_msg = None
-    tmp = error.split('!')
+    tmp = error.split('!', 1)
     if len(tmp) > 1:
         try:
             err_code = tmp[0].strip()
         except (ValueError, TypeError):
             pass
-        # reconstruct
-        err_msg = ('!'.join(tmp[1:])).strip()
+        err_msg = tmp[1].strip()
     elif len(tmp) == 1:
         if tmp[0]:
             err_msg = tmp[0].strip()
     return err_code, err_msg
-
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to