Fix syntax warnings in tests introduced in bpo-15248. (GH-11932)

3 files changed