diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-18 21:18:11 +0000 |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-18 21:18:11 +0000 |
commit | e79c3ccb73d68543e8ad98d69179dee74abff7ab (patch) | |
tree | 3754cd4cd0ddc726c95c456944e7235826a34e3e /test/gtest_uninitialized_test.py | |
parent | f6b0dc0b408f38bb04079b14198d6bdf703e5e56 (diff) | |
download | googletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.tar.gz googletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.tar.bz2 googletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.zip |
Makes the Python tests more portable by calling standard functions to interpret the result of os.system(). This could fix the broken Python tests on some users' machines.
Diffstat (limited to 'test/gtest_uninitialized_test.py')
-rwxr-xr-x | test/gtest_uninitialized_test.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/test/gtest_uninitialized_test.py b/test/gtest_uninitialized_test.py index d553bbf9..037daa8f 100755 --- a/test/gtest_uninitialized_test.py +++ b/test/gtest_uninitialized_test.py @@ -81,13 +81,7 @@ def TestExitCodeAndOutput(command): """Runs the given command and verifies its exit code and output.""" # Verifies that 'command' exits with code 1. - if IS_WINDOWS: - # On Windows, os.system(command) returns the exit code of 'command'. - AssertEq(1, os.system(command)) - else: - # On Unix-like system, os.system(command) returns 256 times the - # exit code of 'command'. - AssertEq(256, os.system(command)) + AssertEq(1, gtest_test_utils.GetExitStatus(os.system(command))) output = GetOutput(command) Assert('InitGoogleTest' in output) |