[FIX] base: adapt test expectation to python 3.7
Compare exception message to the exact one raised in all versions.
This commit is contained in:
@@ -5,7 +5,6 @@ import collections
|
||||
import json
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
|
||||
from lxml import etree
|
||||
|
||||
@@ -481,12 +480,16 @@ class TestQWebNS(TransactionCase):
|
||||
</t>
|
||||
"""
|
||||
})
|
||||
error_msg = "Can't convert 'int' object to str implicitly"
|
||||
if sys.version_info >= (3, 6):
|
||||
error_msg = "must be str, not int"
|
||||
with self.assertRaisesRegexp(QWebException, error_msg):
|
||||
|
||||
try:
|
||||
"" + 0
|
||||
except TypeError as e:
|
||||
error_msg = e.args[0]
|
||||
|
||||
with self.assertRaises(QWebException, msg=error_msg):
|
||||
view1.render()
|
||||
|
||||
|
||||
from copy import deepcopy
|
||||
class FileSystemLoader(object):
|
||||
def __init__(self, path):
|
||||
|
||||
Reference in New Issue
Block a user