diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-04-21 22:50:23 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-04-21 22:50:23 +0000 |
commit | 9ee96e7b40ab4242233e6eb2db8dcf6feaaff69a (patch) | |
tree | 0487cd0b513f2aa132abe2fffdba7e5f911f8a11 /lldb/test/command_source/TestCommandSource.py | |
parent | d4257d847eec684a90392b674c997917d353e433 (diff) | |
download | bcm5719-llvm-9ee96e7b40ab4242233e6eb2db8dcf6feaaff69a.tar.gz bcm5719-llvm-9ee96e7b40ab4242233e6eb2db8dcf6feaaff69a.zip |
Add a HideStdout() method to our TestBase class and call it from TestAbbreviations.py
and TestAliases.py. Pass the keyword argument 'check=False' to:
self.runCmd("script my.date()", check=False)
since we want to restore sys.stdout no matter what the outcome of the runCmd is.
llvm-svn: 129949
Diffstat (limited to 'lldb/test/command_source/TestCommandSource.py')
-rw-r--r-- | lldb/test/command_source/TestCommandSource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/test/command_source/TestCommandSource.py b/lldb/test/command_source/TestCommandSource.py index bd4493f4a35..4c8404a0bec 100644 --- a/lldb/test/command_source/TestCommandSource.py +++ b/lldb/test/command_source/TestCommandSource.py @@ -27,7 +27,8 @@ class CommandSourceTestCase(TestBase): sys.stdout = session # Python should evaluate "my.date()" successfully. - self.runCmd("script my.date()") + # Pass 'check=False' so that sys.stdout gets restored unconditionally. + self.runCmd("script my.date()", check=False) # Now restore stdout to the way we were. :-) sys.stdout = old_stdout |