aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrendan Jackman <brendan.jackman@arm.com>2017-04-26 18:26:21 +0100
committerBrendan Jackman <brendan.jackman@arm.com>2017-04-26 18:26:21 +0100
commit15c5a1f0d3927984b6c5d150127f83747fb135c8 (patch)
tree13d234c0a1585a5a2515ca0c1667f7577316e5b2 /tests
parent3e3ba734d077b116ecf912a51d3428ca6e8ae329 (diff)
downloadtrappy-15c5a1f0d3927984b6c5d150127f83747fb135c8.tar.gz
AbstractDataPlotter: Improve error message for bad signal def
Diffstat (limited to 'tests')
-rw-r--r--tests/test_plotter.py10
1 files changed, 10 insertions, 0 deletions
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"""