From 15c5a1f0d3927984b6c5d150127f83747fb135c8 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 26 Apr 2017 18:26:21 +0100 Subject: AbstractDataPlotter: Improve error message for bad signal def --- tests/test_plotter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/test_plotter.py b/tests/test_plotter.py index 6a9a9f0..dae91c4 100644 --- a/tests/test_plotter.py +++ b/tests/test_plotter.py @@ -193,6 +193,16 @@ class TestPlotter(BaseTestThermal): "cpu_out_power:power"], pivot="cpus") + def test_signals_invalid(self): + """Test that invalid signal defs result in a helpful errror""" + trace = trappy.FTrace() + + with self.assertRaises(ValueError) as assertion: + l = trappy.LinePlot(trace, signals=["INVALID_SIGNAL_DEF"]) + msg = str(assertion.exception) + self.assertIn("Invalid signal definition", msg) + self.assertIn("INVALID_SIGNAL_DEF", msg) + def test_signals_colors(self): """Test signals with colors in LinePlot""" -- cgit v1.2.3