additional test_exceptions fixes

Various fixes to the test suite in the area of exception message rendering
to accommodate for variability in Python versions as well as Pygments.

builds on 9b8da4b1e2bdc025b643f2061aa32 which also
reduced some of the checks for exception message formatting.

also updates black to 22.3.0 as there seem to be some dependency
issues with the older version

Fixes: #360
Change-Id: Ib8916534699e7c57817cf82d53300e50d47d0d50
7 files changed