blob: 0918abb8ac5ee333a37f90b5b245a87994bb488f [file] [log] [blame]
Mike Frysingerf1ba7ad2022-09-12 05:42:57 -04001# Copyright 2015 The ChromiumOS Authors
Dan Jacques2bcefd22015-05-18 14:57:00 -07002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""Unittests for cros_show_waterfall_layout."""
6
Dan Jacques2bcefd22015-05-18 14:57:00 -07007import os
8
Aviv Keshetb7519e12016-10-04 00:50:00 -07009from chromite.lib import constants
Dan Jacques2bcefd22015-05-18 14:57:00 -070010from chromite.lib import cros_test_lib
11from chromite.scripts import cros_show_waterfall_layout
12
Mike Frysinger6a2b0f22020-02-20 13:34:07 -050013
Dan Jacques2bcefd22015-05-18 14:57:00 -070014# pylint: disable=protected-access
15
16
Don Garrettd2a67112018-12-04 18:26:47 -080017class DumpTest(cros_test_lib.OutputTestCase):
Alex Klein1699fab2022-09-08 08:46:06 -060018 """Test the dumping functionality of cros_show_waterfall_layout."""
Dan Jacques2bcefd22015-05-18 14:57:00 -070019
Alex Klein1699fab2022-09-08 08:46:06 -060020 def setUp(self):
21 bin_name = os.path.basename(__file__).rstrip("_unittest.py")
22 self.bin_path = os.path.join(constants.CHROMITE_BIN_DIR, bin_name)
Dan Jacques2bcefd22015-05-18 14:57:00 -070023
Alex Klein1699fab2022-09-08 08:46:06 -060024 def testTextDump(self):
25 """Make sure text dumping is capable of being produced."""
26 with self.OutputCapturer() as output:
27 cros_show_waterfall_layout.main([])
28 self.assertFalse(not output.GetStdout())