diff options
author | Javi Merino <javi.merino@arm.com> | 2016-01-29 10:19:24 +0100 |
---|---|---|
committer | Javi Merino <javi.merino@arm.com> | 2016-01-29 10:19:24 +0100 |
commit | 3ffa9e2049a55744c2486ec049dc78b20ff1f8eb (patch) | |
tree | 248981f4f1fb7a4d1e656996058064bbd1aa2dcc /tests/test_plotter.py | |
parent | 35daa575955457710ade6bd42878607b548b5d3c (diff) | |
download | trappy-3ffa9e2049a55744c2486ec049dc78b20ff1f8eb.tar.gz |
test: Add tests for BarPlot
A couple of simple tests to check that BarPlot doesn't bomb.
Change-Id: Icb430f2ac75f1767de7e5b6e5f63f4fe0c9d6265
Diffstat (limited to 'tests/test_plotter.py')
-rw-r--r-- | tests/test_plotter.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_plotter.py b/tests/test_plotter.py index e675311..ae59384 100644 --- a/tests/test_plotter.py +++ b/tests/test_plotter.py @@ -246,3 +246,20 @@ class TestPlotter(BaseTestThermal): self.assertTrue([4, 5, 1] in data["task1-15411"]) self.assertEquals(procs, expected_procs) self.assertEquals(window, [1, 5]) + +class TestBarPlot(unittest.TestCase): + def setUp(self): + self.dfr = pd.DataFrame({"foo": [1, 2, 3], + "bar": [2, 3, 1], + "baz": [3, 2, 1]}) + + def test_barplot_dfr(self): + """BarPlot plots dataframes without exploding""" + trappy.BarPlot(self.dfr, column=["foo", "bar"]).view(test=True) + + def test_barplot_trace(self): + """BarPlot plots traces without exploding""" + trace = trappy.BareTrace() + trace.add_parsed_event("event", self.dfr) + + trappy.BarPlot(trace, signals=["event:foo", "event:bar"]).view(test=True) |