[tests] Show a more informative message with failing test
[tests] Show a more informative message with failing test

TestTerminalOutput.test_exception_tb fails for Python 3.11.
Show additional information about the reason.

Bug: T297044
Change-Id: I924498656d0e419d6548d7e44e32690d7bce0f37

wikimedia/pywikibot-core,wikimedia/pywikibot-core