Tweak tests to support Python 3.7

Peter Eisentraut <peter_e@gmx.net>

Commit: fa03769e4c4bf0911da71fba2501006b05ea195a
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-05-03T17:13:09Z
Releases: 11.0
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