Fix unit tests which failed under pypy due to a change in the way tracebacks were reported.