On systems where there's no unsetenv function (for example solaris 8), test_site fails because the PYTHONUSERBASE environment variable remains set to "xoxo" (set in the previous tests). This results a failed test_s_option test.
Attached patch uses a copy of os.environ, like other tests already do. Can you test it? Also, is the lack of unsetenv a problem only for test_s_option? If not, we should fix the test infrastructure, not each test.
I confirm that this patch fixes the problem. Thanks. On my systems I haven't seen other bugs related to unsetenv - however, it might be useful to fix subprocess.Popen and subprocess.call to use the os.environ by default (but this would be another request or discussion).