Adapt tests for Python 3.11
Fix broken tests, Python 3.11 brings in enhanced error locations in tracebacks. https://docs.python.org/3.11/whatsnew/3.11.html#enhanced-error-locations-in-tracebacks
--HG-- branch : adapt-tests-for-python3.11
Fix broken tests, Python 3.11 brings in enhanced error locations in tracebacks. https://docs.python.org/3.11/whatsnew/3.11.html#enhanced-error-locations-in-tracebacks
--HG-- branch : adapt-tests-for-python3.11