aboutsummaryrefslogtreecommitdiff
path: root/tests/test_pid.py
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2014-08-12 14:40:56 +0100
committerJavi Merino <javi.merino@arm.com>2015-08-12 14:52:41 +0100
commit06e5ca957b2e748ed7e1f57b3b0291b74231243a (patch)
treec4709971186113b0c3765a2956277f39cc6e34f1 /tests/test_pid.py
parentd2090e29f3e238d7c34f5da921d53c7180b2e526 (diff)
downloadtrappy-06e5ca957b2e748ed7e1f57b3b0291b74231243a.tar.gz
tests: modernise test_pid_controller
Memoize the PIDController object and close all plots before plotting new.
Diffstat (limited to 'tests/test_pid.py')
-rw-r--r--tests/test_pid.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_pid.py b/tests/test_pid.py
index 4fb0db3..9191ca7 100644
--- a/tests/test_pid.py
+++ b/tests/test_pid.py
@@ -18,7 +18,10 @@ class TestPIDController(BaseTestThermal):
"""Test PIDController.plot_controller()
As it happens with all plot functions, just test that it doesn't explode"""
+ pid = PIDController()
+
+ pid.plot_controller()
+ matplotlib.pyplot.close('all')
- PIDController().plot_controller()
- PIDController().plot_controller(title="Antutu", width=20, height=5)
+ pid.plot_controller(title="Antutu", width=20, height=5)
matplotlib.pyplot.close('all')