for better error stack traces. Replace by local_...() variants if possible.
Idea: testing functions gain a con argument if they require a connection, caller checks signature and passes con argument.
A few tests test what happens when/after connection is closed. Rewrite using on.exit().