Test: Add io argument to internal testset printing functions (#59357)
This adds io arguments to various test printing helpers. This is useful
when implementing custom testsets that should not print to stdout.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>