blob: c288a4800bce3acbf81a2259a85699b6d6332029 [file] [log] [blame]
Mike Frysingere58c0e22017-10-04 15:43:30 -04001# -*- coding: utf-8 -*-
Dan Jacques2bcefd22015-05-18 14:57:00 -07002# Copyright 2015 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""Unittests for cros_show_waterfall_layout."""
7
8from __future__ import print_function
9
Dan Jacques2bcefd22015-05-18 14:57:00 -070010import os
11
Aviv Keshetb7519e12016-10-04 00:50:00 -070012from chromite.lib import constants
Dan Jacques2bcefd22015-05-18 14:57:00 -070013from chromite.lib import cros_test_lib
14from chromite.scripts import cros_show_waterfall_layout
15
16# pylint: disable=protected-access
17
18
Don Garrettd2a67112018-12-04 18:26:47 -080019class DumpTest(cros_test_lib.OutputTestCase):
20 """Test the dumping functionality of cros_show_waterfall_layout."""
Dan Jacques2bcefd22015-05-18 14:57:00 -070021
22 def setUp(self):
23 bin_name = os.path.basename(__file__).rstrip('_unittest.py')
24 self.bin_path = os.path.join(constants.CHROMITE_BIN_DIR, bin_name)
25
Dan Jacques2bcefd22015-05-18 14:57:00 -070026 def testTextDump(self):
27 """Make sure text dumping is capable of being produced."""
28 with self.OutputCapturer() as output:
Don Garrettd2a67112018-12-04 18:26:47 -080029 cros_show_waterfall_layout.main([])
Dan Jacques2bcefd22015-05-18 14:57:00 -070030 self.assertFalse(not output.GetStdout())