fix buggy test reset code in require-tests
fix doc format