TST: prevent stderr from leaking to console in util.testing

similar to https://github.com/pydata/pandas/pull/5627

Eliminate some more noise from tests, manifests only on system where `locale` isn't available.