This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: test_site: support for systems without unsetenv
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: csernazs, eric.araujo
Priority: normal Keywords: patch

Created on 2010-06-29 14:27 by csernazs, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit csernazs, 2010-06-29 14:27 Fix for review
fix-9115.diff eric.araujo, 2010-12-26 03:14
Messages (4)
msg108910 - (view) Author: Zsolt Cserna (csernazs) * Date: 2010-06-29 14:27
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.
msg124663 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-26 03:14
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.
msg125188 - (view) Author: Zsolt Cserna (csernazs) * Date: 2011-01-03 16:14
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 to use the os.environ by default (but this would be another request or discussion).
msg125207 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-01-03 17:59
Fixed in r87691 (py3k), r87693 (3.1) and r87694 (2.7), thanks!
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53361
2011-01-03 17:59:02eric.araujosetstatus: open -> closed

messages: + msg125207
resolution: fixed
stage: patch review -> resolved
2011-01-03 16:14:39csernazssetmessages: + msg125188
2010-12-26 03:14:40eric.araujosetfiles: + fix-9115.diff
versions: + Python 3.1, Python 3.2
nosy: + eric.araujo

messages: + msg124663

stage: patch review
2010-06-29 14:27:57csernazscreate