Fix test_logging

Issue #26568: Fix implementation of showwarning() and formatwarning() for
test_logging.
1 file changed