test changes for Python-3.7
authorrobin <robin@reportlab.com>
Tue, 17 Jul 2018 14:09:09 +0100
changeset 64 eb1883176801
parent 63 9ee8c8d7cc04
child 65 f4ed1dc7b03e
test changes for Python-3.7
test/testRXPbasic.py
test/test_xmltestsuite.py
--- a/test/testRXPbasic.py	Thu Jul 12 11:36:48 2018 +0100
+++ b/test/testRXPbasic.py	Tue Jul 17 14:09:09 2018 +0100
@@ -41,7 +41,8 @@
 		rb = 0
 	except:
 		et, ev, _unused = sys.exc_info()
-		sev = ascii(ev)[6:-3]
+		sev = ascii(ev)
+		sev = sev[6:-3 if sev.endswith(",)") else -2]
 		if sev.startswith('u'): sev = sev[1:]
 		r = '%s %s' % (et.__name__, sev[1:])
 		rb = 1
--- a/test/test_xmltestsuite.py	Thu Jul 12 11:36:48 2018 +0100
+++ b/test/test_xmltestsuite.py	Tue Jul 17 14:09:09 2018 +0100
@@ -104,7 +104,7 @@
 	def _test_invalid_parse(self,inname):
 		try:
 			self.parse(inname,Validate=0)
-		except self.mod.error,x:
+		except self.mod.error:
 			self.fail('Failed to parse %r in non-validating mode' % inname)
 
 	def _test_invalid_validate(self,inname):