[bugfix] Adjust traceback line for Python 3.11
[bugfix] Adjust traceback line for Python 3.11

Python 3.11 has introduced an enhanced error locations in tracebacks
as new feature. Adjust the traceback check in ui_tests.TestTerminalOutput

see:
https://docs.python.org/3.11/whatsnew/3.11.html

Bug: T297044
Change-Id: I06961c7c71080b3d6bdde3cf143bea7a86bb5280

wikimedia/pywikibot-core,wikimedia/pywikibot-core