But maybe the test runner runs unit:before-module() as a separate transaction?
That does look to be the behaviour -- the phrase "This extension is e. g. helpful if the results of updates need to be tested." and the accompanying code snippet [1] imply as much to me, but it would be good if the BaseX dev team could confirm, and the documentation make this explicit.
Andrew