Reformat docs tests (#8368)