summaryrefslogtreecommitdiff
path: root/test/gtest_output_test.py
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-19 00:24:28 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-19 00:24:28 +0000
commit4e7e2fcd7ac837bf81d8f120a9a30785d83b3897 (patch)
tree2f098d474cb2f1fc56bcd67a7ef31fe0886da3da /test/gtest_output_test.py
parent6d63ee6720540cadb8919037c5d41a6413cc9101 (diff)
downloadgoogletest-4e7e2fcd7ac837bf81d8f120a9a30785d83b3897.tar.gz
Fixes broken gtest_unittest on Cygwin and cleans it up (by Vlad Losev); fixes the wrong usage of os.environ.clear() in gtest_output_test.py (by Vlad Losev); fixes the logic for detecting Symbian (by Zhanyong Wan); moves TestProperty for event listener (by Vlad Losev).
git-svn-id: http://googletest.googlecode.com/svn/trunk@269 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest_output_test.py')
-rwxr-xr-xtest/gtest_output_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/gtest_output_test.py b/test/gtest_output_test.py
index 91cf915..c6ea0f8 100755
--- a/test/gtest_output_test.py
+++ b/test/gtest_output_test.py
@@ -185,7 +185,11 @@ def IterShellCommandOutput(env_cmd, stdin_string=None):
old_env_vars = dict(os.environ)
os.environ.update(env_cmd[0])
stdin_file, stdout_file = os.popen2(env_cmd[1], 'b')
- os.environ.clear()
+ # Changes made by os.environ.clear are not inheritable by child processes
+ # until Python 2.6. To produce inheritable changes we have to delete
+ # environment items with the del statement.
+ for key in os.environ.keys():
+ del os.environ[key]
os.environ.update(old_env_vars)
# If the caller didn't specify a string for STDIN, gets it from the