bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)

The patch needed for 2.7 should make the test more stable on 3.x also.
1 file changed