[Python-checkins] bpo-46852: Restore test_getformat() test (GH-31601)