diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-06-19 00:24:28 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-06-19 00:24:28 +0000 |
commit | ae3247986bbbafcc913b5fe6132090ad6f1c3f36 (patch) | |
tree | 2f098d474cb2f1fc56bcd67a7ef31fe0886da3da /test/gtest_output_test.py | |
parent | 532dc2de35f2cef191bc91c3587a9f8f4974756f (diff) | |
download | googletest-ae3247986bbbafcc913b5fe6132090ad6f1c3f36.tar.gz googletest-ae3247986bbbafcc913b5fe6132090ad6f1c3f36.tar.bz2 googletest-ae3247986bbbafcc913b5fe6132090ad6f1c3f36.zip |
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).
Diffstat (limited to 'test/gtest_output_test.py')
-rwxr-xr-x | test/gtest_output_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/gtest_output_test.py b/test/gtest_output_test.py index 91cf9153..c6ea0f8c 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 |