From 373c30fb1a6cbc6ae73ebe9017970901211f4e88 Mon Sep 17 00:00:00 2001 From: Javi Merino Date: Tue, 8 Mar 2016 13:59:25 +0000 Subject: tests: avoid matplotlib warning when running the testsuite When you try to plot a dataframe with only one index, matplotlib complains: ---8<--- /usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2787: UserWarning: Attempting to set identical left==right re sults in singular transformations; automatically expanding. left=0.0, right=0.0 'left=%s, right=%s') % (left, right)) ---8<--- Change the timestamp of the second event to make it more realistic and make sure that the dataframe that is plotted has more than one row. --- tests/test_ftrace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_ftrace.py') diff --git a/tests/test_ftrace.py b/tests/test_ftrace.py index e0c8a13..234ec1c 100644 --- a/tests/test_ftrace.py +++ b/tests/test_ftrace.py @@ -272,7 +272,7 @@ class TestFTrace(BaseTestThermal): """Check that plot_allfreqs() works with one actor""" in_data = """ kworker/4:1-397 [004] 720.741349: thermal_power_cpu_get: cpus=00000000,00000006 freq=1400000 raw_cpu_power=189 load={23, 12} power=14 - kworker/4:1-397 [004] 720.741349: thermal_power_cpu_limit: cpus=00000000,00000006 freq=1400000 cdev_state=1 power=14""" + kworker/4:1-397 [004] 720.741679: thermal_power_cpu_limit: cpus=00000000,00000006 freq=1400000 cdev_state=1 power=14""" with open("trace.txt", "w") as fout: fout.write(in_data) -- cgit v1.2.3