Tweak tests to support Python 3.7

Peter Eisentraut <peter_e@gmx.net>

Commit: b812d63725724ed33c535e7643703c7f2f6aa7c5
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-05-06T03:48:19Z
Releases: 9.5.13
Tweak tests to support Python 3.7

Python 3.7 removes the trailing comma in the repr() of
BaseException (see <https://bugs.python.org/issue30399>), leading to
test output differences.  Work around that by composing the equivalent
test output in a more manual way.

Files