Have you tried using a wrapper?
I remember originally noting this with wrappers but IIRC a Prolog wrapper can not pass stateful information from the before
predicate to the after
predicate. Never checked if that was allowed or not.
I also have to agree that this is often the case
other test frameworks allow specifying both global setup/cleanup and every-test setup/cleanup