Commit 79832abd authored by Jérome Perrin's avatar Jérome Perrin

tests: support python 3.11 tracebacks

parent 8fababe1
......@@ -69,6 +69,7 @@ In case of error, a proper traceback is displayed and nothing is installed::
...
File "script", line 3, in <module>
print(1 / 0.) # this is an error !
~~^~~~
ZeroDivisionError: float division by zero
>>> ls(sample_buildout, 'parts')
......
......@@ -647,8 +647,16 @@ renormalizing_patterns = [
), ''),
(re.compile('Fetching origin\n'), ''),
(re.compile('[0-9a-f]{32}'), md5sum),
(re.compile(r'http://localhost:\d+'), 'http://test.server'),
(re.compile(
r' print\(1 / 0.\) # this is an error !\n'
r'ZeroDivisionError'),
' print(1 / 0.) # this is an error !\n'
' ~~^~~~\n'
'ZeroDivisionError'),
]
def test_suite():
suite = unittest.TestSuite((
doctest.DocFileSuite(
......@@ -657,9 +665,7 @@ def test_suite():
setUp=setUp,
tearDown=zc.buildout.testing.buildoutTearDown,
optionflags=optionflags,
checker=renormalizing.RENormalizing([
(re.compile(r'http://localhost:\d+'), 'http://test.server'),
] + renormalizing_patterns),
checker=renormalizing.RENormalizing(renormalizing_patterns),
globs={'MD5SUM': MD5SUM},
),
unittest.makeSuite(DownloadTests),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment