diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-11-26 20:06:52 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-11-26 20:06:52 +0000 |
commit | 69bc764afbe25a110920b5595abbd71fa712e085 (patch) | |
tree | 77e4713f5743ac19351aa9bbe9df87bf186c8516 | |
parent | 365a150aeb599922be07d5f62939d0be04f1f19f (diff) | |
download | googletest-69bc764afbe25a110920b5595abbd71fa712e085.tar.gz |
Adding test/gtest_uninitialized_test.py missing from the previous check-in
git-svn-id: http://googletest.googlecode.com/svn/trunk@138 861a406c-534a-0410-8894-cb66d6ee9925
-rwxr-xr-x | test/gtest_uninitialized_test.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/test/gtest_uninitialized_test.py b/test/gtest_uninitialized_test.py index 037daa8..a3ba629 100755 --- a/test/gtest_uninitialized_test.py +++ b/test/gtest_uninitialized_test.py @@ -67,24 +67,14 @@ def AssertEq(expected, actual): raise AssertionError -def GetOutput(command): - """Runs the given command and returns its output.""" - - stdin, stdout = os.popen2(command, 't') - stdin.close() - output = stdout.read() - stdout.close() - return output - - def TestExitCodeAndOutput(command): """Runs the given command and verifies its exit code and output.""" # Verifies that 'command' exits with code 1. - AssertEq(1, gtest_test_utils.GetExitStatus(os.system(command))) - - output = GetOutput(command) - Assert('InitGoogleTest' in output) + p = gtest_test_utils.Subprocess(command) + Assert(p.exited) + AssertEq(1, p.exit_code) + Assert('InitGoogleTest' in p.output) if IS_WINDOWS: |