bisect-kit: fix exception in 'view' command output
BUG=None
TEST=unittest
Change-Id: I53e887ac71a64f1f9e314fe3b5f776fb752f8f4f
Reviewed-on: https://chromium-review.googlesource.com/1420422
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Chi-Ngai Wan <cnwan@google.com>
diff --git a/bisect_kit/cli_test.py b/bisect_kit/cli_test.py
index 1762ecf..54d15ce 100644
--- a/bisect_kit/cli_test.py
+++ b/bisect_kit/cli_test.py
@@ -323,6 +323,10 @@
bisector.main('config', 'noisy', 'old=1/10,new=8/9')
self.assertEqual(bisector.states.config['noisy'], 'old=1/10,new=8/9')
+ with mock.patch('sys.stdout', new_callable=StringIO.StringIO):
+ # Only make sure no exceptions. No output verification.
+ bisector.main('view')
+
def test_current_status(self):
common.init()
bisector = cli.BisectorCommandLine(DummyDomain)